Files
iot-device-management-frontend/playground/src/api/core/timezone.ts

27 lines
657 B
TypeScript
Raw Normal View History

import { requestClient } from '#/api/request';
/**
*
*/
export async function getTimezoneOptionsApi() {
return await requestClient.get<
{
label: string;
value: string;
}[]
>('/timezone/getTimezoneOptions');
}
/**
*
*/
export async function getTimezoneApi(): Promise<null | string | undefined> {
return requestClient.get<null | string | undefined>('/timezone/getTimezone');
}
/**
*
* @param timezone
*/
export async function setTimezoneApi(timezone: string): Promise<void> {
return requestClient.post('/timezone/setTimezone', { timezone });
}