diff --git a/src/app.controller.ts b/src/app.controller.ts index 481bafd8e..3cc2b2862 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -6,7 +6,7 @@ export class AppController { constructor(private authService: AuthService) {} - @Get('ping') + @Get([ '', 'ping' ]) healthCheck(): any { return { statusCode: HttpStatus.OK, diff --git a/src/cart/cart.controller.ts b/src/cart/cart.controller.ts index c8574aaf2..eacf1bfb5 100644 --- a/src/cart/cart.controller.ts +++ b/src/cart/cart.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get, Delete, Put, Body, Req, Post, UseGuards, HttpStatus } from '@nestjs/common'; -import { BasicAuthGuard, JwtAuthGuard } from '../auth'; +// import { BasicAuthGuard, JwtAuthGuard } from '../auth'; import { OrderService } from '../order'; import { AppRequest, getUserIdFromRequest } from '../shared'; @@ -15,7 +15,7 @@ export class CartController { ) { } // @UseGuards(JwtAuthGuard) - @UseGuards(BasicAuthGuard) + // @UseGuards(BasicAuthGuard) @Get() findUserCart(@Req() req: AppRequest) { const cart = this.cartService.findOrCreateByUserId(getUserIdFromRequest(req)); @@ -28,7 +28,7 @@ export class CartController { } // @UseGuards(JwtAuthGuard) - @UseGuards(BasicAuthGuard) + // @UseGuards(BasicAuthGuard) @Put() updateUserCart(@Req() req: AppRequest, @Body() body) { // TODO: validate body payload... const cart = this.cartService.updateByUserId(getUserIdFromRequest(req), body) @@ -44,7 +44,7 @@ export class CartController { } // @UseGuards(JwtAuthGuard) - @UseGuards(BasicAuthGuard) + // @UseGuards(BasicAuthGuard) @Delete() clearUserCart(@Req() req: AppRequest) { this.cartService.removeByUserId(getUserIdFromRequest(req)); @@ -56,7 +56,7 @@ export class CartController { } // @UseGuards(JwtAuthGuard) - @UseGuards(BasicAuthGuard) + // @UseGuards(BasicAuthGuard) @Post('checkout') checkout(@Req() req: AppRequest, @Body() body) { const userId = getUserIdFromRequest(req);