refactor coupon module

This commit is contained in:
2026-02-09 20:34:06 +03:30
parent 586588c7f1
commit 8ba45c5d82
6 changed files with 21 additions and 51 deletions
@@ -22,7 +22,7 @@ export class ContactService {
let shop: Shop | null = null;
if ((restId || slug) && dto.scope === ContactScope.RESTAURANT) {
if ((restId || slug) && dto.scope === ContactScope.SHOP) {
shop = await this.em.findOne(Shop, {
...(restId ? { id: restId } : {})
, ...(slug ? { slug: slug } : {})
@@ -49,7 +49,7 @@ export class ContactService {
orderBy: dto.orderBy,
order: dto.order,
status: dto.status,
scope: ContactScope.RESTAURANT,
scope: ContactScope.SHOP,
restaurantId
});
}