From e9e92c6e9ec933bf96f4b188e25445939a8afa5f Mon Sep 17 00:00:00 2001 From: dominicbachmann Date: Wed, 6 Apr 2022 20:31:51 +0200 Subject: [PATCH] Added types to databse/settings --- src/lib/database/settings.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/database/settings.ts b/src/lib/database/settings.ts index 31d6b3c04..2d0395d88 100644 --- a/src/lib/database/settings.ts +++ b/src/lib/database/settings.ts @@ -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 { + const settings = await prisma.setting.findFirst({}); if (settings.proxyPassword) settings.proxyPassword = decrypt(settings.proxyPassword); return settings; }