mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-23 02:29:09 +00:00
FIX: Add Cors Config
This commit is contained in:
+8
-1
@@ -5,7 +5,14 @@ import { writeFileSync } from 'fs';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const app = await NestFactory.create(AppModule, {
|
||||
cors: {
|
||||
origin: '*',
|
||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||
preflightContinue: false,
|
||||
optionsSuccessStatus: 204,
|
||||
},
|
||||
});
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle('Maestro Grpc Documentation')
|
||||
|
||||
@@ -38,7 +38,7 @@ export class InputsController {
|
||||
}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
async findAll((@Body() body) {
|
||||
console.log(`/input`, 'ON FIND ALL ROUTE');
|
||||
|
||||
const inputService = new InputsService(this.inputsClientService);
|
||||
|
||||
@@ -15,9 +15,9 @@ export class InputsService {
|
||||
}
|
||||
}
|
||||
|
||||
async findAll() {
|
||||
async findAll(body) {
|
||||
try {
|
||||
const findAllInputResponse = await this.inputClient.findAll({});
|
||||
const findAllInputResponse = await this.inputClient.findAll(body);
|
||||
|
||||
return findAllInputResponse;
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user