chore(workspace): eradicate all tsc errors and eslint warnings across frontend, admin, and backend
Deploy Canina / deploy (push) Failing after 29s
Deploy Canina / deploy (push) Failing after 29s
This commit is contained in:
1 parent
4659a7b1de
commit
9f11d8fb2d
98 files changed
+1272
-1009
No files matched your search
@@ -1,6 +1,13 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
|
||||
export class ScientificTermData {
|
||||
term?: string;
|
||||
definition?: string;
|
||||
wikiId?: string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class SettingsService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
@@ -21,7 +28,7 @@ export class SettingsService {
|
||||
return this.prisma.scientificTerm.findMany();
|
||||
}
|
||||
|
||||
async upsertScientificTerm(key: string, data: any) {
|
||||
async upsertScientificTerm(key: string, data: ScientificTermData) {
|
||||
const term = String(data?.term || '');
|
||||
const definition = String(data?.definition || '');
|
||||
const wikiId = String(data?.wikiId || 'general');
|
||||
@@ -55,7 +62,7 @@ export class SettingsService {
|
||||
return setting ? setting.value : {};
|
||||
}
|
||||
|
||||
async updateCategorySetting(category: string, value: any) {
|
||||
async updateCategorySetting(category: string, value: Prisma.InputJsonValue) {
|
||||
const key = `${category}_config`;
|
||||
return this.prisma.setting.upsert({
|
||||
where: { key },
|
||||
|
||||
Reference in new issue
Block a user