refactor(goods): streamline goods service and controller, remove favorites module
- Removed the PosGoodFavorite module, controller, and service to simplify the codebase. - Updated goods service to handle cache invalidation directly. - Refactored goods controller to remove commented-out code and improve clarity. - Introduced OwnedGoods module for better organization of owned goods functionality. - Updated DTOs to extend from existing structures for consistency. - Enhanced cache invalidation logic in goods service and owned goods service.
This commit is contained in:
@@ -39,8 +39,12 @@ export class GoodsController {
|
||||
},
|
||||
},
|
||||
})
|
||||
create(@Body() data: CreateGuildGoodDto, @UploadedFile() file: Express.Multer.File) {
|
||||
return this.goodsService.create(data, file)
|
||||
create(
|
||||
@Param('guildId') guildId: string,
|
||||
@Body() data: CreateGuildGoodDto,
|
||||
@UploadedFile() file: Express.Multer.File,
|
||||
) {
|
||||
return this.goodsService.create(guildId, data, file)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
@@ -55,10 +59,11 @@ export class GoodsController {
|
||||
},
|
||||
})
|
||||
update(
|
||||
@Param('guildId') guildId: string,
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateGuildGoodDto,
|
||||
@UploadedFile() file: Express.Multer.File,
|
||||
) {
|
||||
return this.goodsService.update(id, data, file)
|
||||
return this.goodsService.update(guildId, id, data, file)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user