Spaces:
Runtime error
Runtime error
Download src/auth/auth.controller.ts from akash1313/kodelyx-backend: direct link, hf CLI and curl.
- Browser
- Download file 708 Bytes
-
https://huggingface.co/spaces/akash1313/kodelyx-backend/resolve/main/src/auth/auth.controller.ts
- Command line
-
hf download hf://spaces/akash1313/kodelyx-backend/src/auth/auth.controller.ts
-
curl -L -o auth.controller.ts https://huggingface.co/spaces/akash1313/kodelyx-backend/resolve/main/src/auth/auth.controller.ts
708 Bytes
| import { Controller, Post, Body, Res, HttpStatus } from '@nestjs/common'; | |
| import { AuthService } from './auth.service'; | |
| import { SignupDto, SigninDto } from './dto'; | |
| import { Response } from 'express'; | |
| ('api/auth') | |
| export class AuthController { | |
| constructor(private readonly authService: AuthService) {} | |
| ('signup') | |
| async signup(() dto: SignupDto, () res: Response) { | |
| const result = await this.authService.signup(dto); | |
| return res.status(HttpStatus.CREATED).json(result); | |
| } | |
| ('signin') | |
| async signin(() dto: SigninDto, () res: Response) { | |
| const result = await this.authService.signin(dto); | |
| return res.status(HttpStatus.OK).json(result); | |
| } | |
| } | |