refactor(api): enforce layered architecture by moving db queries to core services

This commit is contained in:
yiling
2026-08-01 16:25:01 +08:00
parent fb66166b49
commit 97069042b2
26 changed files with 256 additions and 363 deletions
+11
View File
@@ -275,6 +275,17 @@ export class SkillService {
return { name, description }
}
async getSkill(id: string) {
const s = await this.prismaClient.skill.findUnique({
where: { id },
})
if (!s) return null
return {
...this.toSkillInfo(s),
teamId: s.teamId,
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private toSkillInfo(s: any): SkillInfo {
return {