runtipi/e2e/helpers/settings.ts
2023-11-02 19:04:57 +01:00

8 lines
321 B
TypeScript

import { promises } from 'fs';
import path from 'path';
import { z } from 'zod';
import { settingsSchema } from '@runtipi/shared';
export const setSettings = async (settings: z.infer<typeof settingsSchema>) => {
await promises.writeFile(path.join(__dirname, '../../state/settings.json'), JSON.stringify(settings));
};