Loading backend/src/auth/admin/authAdmincontroller.ts +18 −1 Original line number Diff line number Diff line import { Body, Controller, Post } from '@nestjs/common'; import { EncryptionService } from '../encryption/encryption.service'; import { AuthAdminService } from './authAdminservice'; import { CreateAdminDto } from 'src/admin/dto/create-admin.dto'; import { LoginAdminDto } from 'src/auth/admin/dto/login-admin.dto'; import { ApiBearerAuth, ApiBody, ApiCreatedResponse, ApiTags, } from '@nestjs/swagger'; @Controller('auth') @ApiTags('Create admin account and sign in as admin') export class AuthAdminController { constructor(private readonly authAdminService: AuthAdminService) {} @ApiBody({ type: CreateAdminDto }) @ApiBearerAuth() @ApiCreatedResponse({ content: { 'application/json': { example: { token: 'token', }, }, }, }) @Post('admin/signup') async signUp(@Body() createAdminDto: CreateAdminDto) { console.log(createAdminDto); Loading Loading
backend/src/auth/admin/authAdmincontroller.ts +18 −1 Original line number Diff line number Diff line import { Body, Controller, Post } from '@nestjs/common'; import { EncryptionService } from '../encryption/encryption.service'; import { AuthAdminService } from './authAdminservice'; import { CreateAdminDto } from 'src/admin/dto/create-admin.dto'; import { LoginAdminDto } from 'src/auth/admin/dto/login-admin.dto'; import { ApiBearerAuth, ApiBody, ApiCreatedResponse, ApiTags, } from '@nestjs/swagger'; @Controller('auth') @ApiTags('Create admin account and sign in as admin') export class AuthAdminController { constructor(private readonly authAdminService: AuthAdminService) {} @ApiBody({ type: CreateAdminDto }) @ApiBearerAuth() @ApiCreatedResponse({ content: { 'application/json': { example: { token: 'token', }, }, }, }) @Post('admin/signup') async signUp(@Body() createAdminDto: CreateAdminDto) { console.log(createAdminDto); Loading