All error messages in german and in englisch

This commit is contained in:
rxf
2023-05-09 15:37:27 +02:00
parent 2cf418756d
commit 347c6bdc96
17 changed files with 1007 additions and 243 deletions
+2 -3
View File
@@ -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) {