bug
This commit is contained in:
@@ -257,7 +257,7 @@ export class CouponService {
|
|||||||
return prefix + '-' + result;
|
return prefix + '-' + result;
|
||||||
}
|
}
|
||||||
|
|
||||||
async generateCouponCode(restId: string){
|
async generateCouponCode(restId: string): Promise<{ code: string }> {
|
||||||
const restaurant = await this.restRepository.findOne({ id: restId });
|
const restaurant = await this.restRepository.findOne({ id: restId });
|
||||||
if (!restaurant) {
|
if (!restaurant) {
|
||||||
throw new NotFoundException(RestMessage.NOT_FOUND);
|
throw new NotFoundException(RestMessage.NOT_FOUND);
|
||||||
|
|||||||
Reference in New Issue
Block a user