mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-06 07:49:09 +00:00
FEAT: decorators to apply an origin in endpoint router
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
||||
import { Body, Controller, Inject, Post, UseFilters } from '@nestjs/common';
|
||||
import { Body, Controller, Inject, Post, UseFilters, UseGuards } from '@nestjs/common';
|
||||
import { ApiCreatedResponse, ApiHeaders, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
||||
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
|
||||
@@ -8,6 +8,7 @@ import { UsersService } from '../users/users.service';
|
||||
import { Language } from 'src/decorators/language.decorator';
|
||||
import { OpenDataService } from './open-data.service';
|
||||
import { CreateUserOpenDataDTO, WordpressForm } from './dto/wordpres-form';
|
||||
import { CORSGuard, SetOrigin } from 'src/decorators/set-origin.decorator';
|
||||
|
||||
@Controller('open-data')
|
||||
@ApiInternalOnlyController()
|
||||
@@ -26,6 +27,8 @@ export class OpenDataController {
|
||||
}
|
||||
|
||||
@Post("/sharing-ocean-data")
|
||||
@SetOrigin('https://devsbm.dadosfera.io/')
|
||||
@UseGuards(CORSGuard)
|
||||
@ApiOkResponse()
|
||||
async createUser(
|
||||
@Body()
|
||||
|
||||
Reference in New Issue
Block a user