15 lines
356 B
TypeScript
15 lines
356 B
TypeScript
import { get, put } from './lib';
|
|
|
|
export const getSettings = async () => {
|
|
try {
|
|
return await get('settings', true);
|
|
} catch (err) {
|
|
console.error({ caller: 'getSettings', err });
|
|
return undefined;
|
|
}
|
|
};
|
|
|
|
export const putSettings = async (settings: any) => {
|
|
return await put('settings', 'settings', (_: any) => settings, {}, true);
|
|
};
|