FIX: hide internal endpoints

This commit is contained in:
Gabriel Rosa
2023-02-15 13:13:43 -03:00
parent 99288fa805
commit 6a14c2b459
24 changed files with 3864 additions and 4612 deletions
+5
View File
@@ -24,6 +24,7 @@ import { UpdateInputRequest } from './dtos/old_interfaces';
import { RequestUser, User } from 'src/decorators/user.decorator';
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
import { ApiInternalOnlyEndpoint } from 'src/decorators/swagger.decorator';
@ApiTags('Inputs')
@Controller('inputs')
@@ -66,6 +67,7 @@ export class InputsController {
this.logger = dadosferaLogger.logger;
}
@ApiInternalOnlyEndpoint()
@Get('available-entities/:plugin')
@ApiOkResponse({ type: GetAvailableEntitiesRes })
async getAvailableEntities(
@@ -102,6 +104,7 @@ export class InputsController {
return response;
}
@ApiInternalOnlyEndpoint()
@Get()
async findAll(@User() user: RequestUser) {
const { user_id, customer_id, customer_name: customer } = user;
@@ -132,6 +135,7 @@ export class InputsController {
return response;
}
@ApiInternalOnlyEndpoint()
@Patch(':id')
async update(@Body() updateInputDto: UpdateInputRequest, @Param() params) {
const { id } = params;
@@ -147,6 +151,7 @@ export class InputsController {
return response;
}
@ApiInternalOnlyEndpoint()
@Delete(':id')
async delete(@Body() data, @Param() params) {
const { id } = params;