From 72569a0f75584b054903ee14ceaeebb84bcfe6e1 Mon Sep 17 00:00:00 2001 From: gogacoder Date: Sun, 16 Mar 2025 21:32:26 +0700 Subject: [PATCH] fix: service template --- generation/templates/service.tmpl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generation/templates/service.tmpl b/generation/templates/service.tmpl index ed4680b..5a06d9d 100644 --- a/generation/templates/service.tmpl +++ b/generation/templates/service.tmpl @@ -33,7 +33,7 @@ export default class {{.ModelName}}Service implements IService<{{.ModelName}}> { return await SearchByAllTextFields(input) as {{ .ModelName }}[] } - async sort(options: SortOptions) { + async sort(options: SortOptions<{{.ModelName}}>) { return (await SortedByOrder( Object.entries(options).map((item) => { if (item[1] !== 'NONE') { @@ -43,7 +43,6 @@ export default class {{.ModelName}}Service implements IService<{{.ModelName}}> { }) } }).filter(item => !!item) - )) as Task[]; + )) as {{.ModelName}}[]; } -} } \ No newline at end of file