feat: add field validators for username and password, and integrate them into DTOs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user