All error messages in german and in englisch
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import * as mongo from "../databases/mongo.js"
|
||||
import * as mock from "../mocks/mongo_mock.js"
|
||||
import {returnOnError} from "../utilities/reporterror.js"
|
||||
import * as ERR from "../utilities/errortexts.js"
|
||||
import checkParams from "../utilities/checkparams.js"
|
||||
|
||||
const mockdb = false
|
||||
@@ -26,13 +25,13 @@ export const getOneProperty = async (params) => {
|
||||
try {
|
||||
let pp = await readProperties({sid: opts.sensorid}); // read for given sensorID
|
||||
if ((pp.properties == null) || (pp.error)) {
|
||||
return returnOnError(properties, ERR.NOPROPSREAD.replace('xx', opts.sensorid), getOneProperty.name)
|
||||
return returnOnError(properties, 'NOPROPSREAD', getOneProperty.name, opts.sensorid)
|
||||
}
|
||||
// now find sensors with same location
|
||||
let query = {"location.0.id": pp.properties.location[0].id}
|
||||
let others = await readProperties(query)
|
||||
if (others.err) {
|
||||
return returnOnError(properties, ERR.NOPROPSREAD.replace('xx',others.errortext), getOneProperty.name)
|
||||
return returnOnError(properties, 'NOPROPSREAD', getOneProperty.name, others.errortext)
|
||||
}
|
||||
if (others.properties.length > 0) {
|
||||
for (const x of others.properties) {
|
||||
|
||||
Reference in New Issue
Block a user