full project: admin panel, backend modules, docs
This commit is contained in:
@@ -9,4 +9,12 @@ export class SettingsService {
|
||||
const setting = await this.prisma.settings.findUnique({ where: { key: 'global' } });
|
||||
return setting?.value;
|
||||
}
|
||||
|
||||
async updateGlobal(value: Record<string, any>) {
|
||||
return this.prisma.settings.upsert({
|
||||
where: { key: 'global' },
|
||||
create: { key: 'global', value },
|
||||
update: { value },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user