Added types to databse/settings
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user