skip to Main Content

Javascript – Use Response object in service Nestjs

I have this controller @Post('/login') async login(@Res() res: Response, @Body() body: LoginDto) { try { const user = await this.authService.login(body); return ResponseUtil.success(res, user, 'nice'); } catch (error) { return ResponseUtil.serverError(res, error.stack); } } I want to use res in authService…

VIEW QUESTION

Javascript – Nest JS route not getting mapped

import { Controller, Post, UploadedFile, Get, Param, Res, UseInterceptors, StreamableFile, Header } from '@nestjs/common'; import { FileInterceptor } from '@nestjs/platform-express'; import { Response } from 'express'; import { createReadStream } from 'fs'; import { join } from 'path'; @Controller() export…

VIEW QUESTION
Back To Top
Search