From bff39d2c75058bbd23edc7017fded4b081343d11 Mon Sep 17 00:00:00 2001 From: opbnq-q Date: Sun, 16 Mar 2025 11:56:16 +0700 Subject: [PATCH] fix: 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 96ab790..8185486 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