refactored system settings
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
export async function handleSystemSave(
|
||||
deviceName: string,
|
||||
sntpServer: string,
|
||||
sntpInterval: number,
|
||||
timeZone: string
|
||||
) {
|
||||
import type { SystemValues } from "../../../types/types";
|
||||
|
||||
export async function handleSystemSave(values: SystemValues) {
|
||||
const payload = {
|
||||
// Build JSON
|
||||
id: "GLOBAL--Device",
|
||||
fields: [
|
||||
{ property: "propDeviceName", value: deviceName },
|
||||
{ property: "propSNTPServer", value: sntpServer },
|
||||
{ property: "propSNTPIntervalMinutes", value: Number(sntpInterval) },
|
||||
{ property: "propLocalTimeZone", value: timeZone },
|
||||
{ property: "propDeviceName", value: values.deviceName },
|
||||
{ property: "propSNTPServer", value: values.sntpServer },
|
||||
{
|
||||
property: "propSNTPIntervalMinutes",
|
||||
value: Number(values.sntpInterval),
|
||||
},
|
||||
{ property: "propLocalTimeZone", value: values.timeZone },
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user