Added types to databse/settings
This commit is contained in:
parent
008cfdba09
commit
e9e92c6e9e
@ -1,8 +1,9 @@
|
||||
import { decrypt } from '$lib/crypto';
|
||||
import { prisma } from './common';
|
||||
import type { Setting } from '@prisma/client';
|
||||
|
||||
export async function listSettings() {
|
||||
let settings = await prisma.setting.findFirst({});
|
||||
export async function listSettings(): Promise<Setting> {
|
||||
const settings = await prisma.setting.findFirst({});
|
||||
if (settings.proxyPassword) settings.proxyPassword = decrypt(settings.proxyPassword);
|
||||
return settings;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user