feat: add field validators for username and password, and integrate them into DTOs

This commit is contained in:
2026-05-19 20:34:05 +03:30
parent d526f6ed2c
commit 98099e97e7
17 changed files with 136 additions and 33 deletions
+6 -12
View File
@@ -52,20 +52,14 @@ export class CatalogsService {
async getSKU(search: string) {
const items = await this.prisma.stockKeepingUnits.findMany({
// where: {
// OR: [{ code: { contains: search } }, { name: { contains: search } }],
// },
select: {
id: true,
code: true,
name: true,
is_domestic: true,
is_public: true,
VAT: true,
},
take: 100,
})
return ResponseMapper.list(items)
const mappedItems = items.map(item => ({
...item,
fullname: `${item.code} - ${item.name}`,
}))
return ResponseMapper.list(mappedItems)
}
async getGuildGoodCategories(guild_id: string) {