formatting

This commit is contained in:
proddy
2024-12-16 21:44:14 +01:00
parent 3558591480
commit 150695c185
3 changed files with 6 additions and 5 deletions

View File

@@ -34,7 +34,10 @@ export function formatValue(
if (value === undefined || typeof value === 'boolean') {
return '';
}
return (value as string) + (uom === undefined || uom === 0 ? '' : ' ' + DeviceValueUOM_s[uom]);
return (
(value as string) +
(uom === undefined || uom === 0 ? '' : ' ' + DeviceValueUOM_s[uom])
);
}
switch (uom) {

View File

@@ -382,9 +382,7 @@ export const entityItemValidation = (entity: EntityItem[], entityItem: EntityIte
{ required: true, message: 'Offset is required' },
{ type: 'number', min: 0, max: 255, message: 'Must be between 0 and 255' }
],
factor: [
{ required: true, message: 'is required' }
]
factor: [{ required: true, message: 'is required' }]
});
export const uniqueTemperatureNameValidator = (

View File

@@ -4938,7 +4938,7 @@ router
export default {
port: 3080,
fetch: router.fetch,
fetch: router.fetch
// missing: () => error(404, 'Error, endpoint not found'),
// finally: [logger]
};