mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
fix: remove send email endpoint
This commit is contained in:
@ -1,10 +1,9 @@
|
|||||||
import { Body, Controller, Get, HttpCode, HttpStatus, Post, Query, UseGuards } from '@nestjs/common';
|
import { Controller, Get, HttpCode, HttpStatus, Post, Query, UseGuards } from '@nestjs/common';
|
||||||
import { ApiBearerAuth, ApiResponse, ApiTags } from '@nestjs/swagger';
|
import { ApiBearerAuth, ApiResponse, ApiTags } from '@nestjs/swagger';
|
||||||
import { IJwtPayload } from '~/auth/interfaces';
|
import { IJwtPayload } from '~/auth/interfaces';
|
||||||
import { AuthenticatedUser } from '~/common/decorators';
|
import { AuthenticatedUser } from '~/common/decorators';
|
||||||
import { AccessTokenGuard } from '~/common/guards';
|
import { AccessTokenGuard } from '~/common/guards';
|
||||||
import { PageOptionsRequestDto } from '~/core/dtos';
|
import { PageOptionsRequestDto } from '~/core/dtos';
|
||||||
import { SendEmailRequestDto } from '../dtos/request';
|
|
||||||
import { NotificationsPageResponseDto } from '../dtos/response';
|
import { NotificationsPageResponseDto } from '../dtos/response';
|
||||||
import { NotificationsService } from '../services/notifications.service';
|
import { NotificationsService } from '../services/notifications.service';
|
||||||
|
|
||||||
@ -34,11 +33,4 @@ export class NotificationsController {
|
|||||||
markAsRead(@AuthenticatedUser() { sub }: IJwtPayload) {
|
markAsRead(@AuthenticatedUser() { sub }: IJwtPayload) {
|
||||||
return this.notificationsService.markAsRead(sub);
|
return this.notificationsService.markAsRead(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('email')
|
|
||||||
@UseGuards(AccessTokenGuard)
|
|
||||||
@HttpCode(HttpStatus.NO_CONTENT)
|
|
||||||
sendEmail(@AuthenticatedUser() { sub }: IJwtPayload, @Body() body: SendEmailRequestDto) {
|
|
||||||
return this.notificationsService.sendEmail(body);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user