mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-28 20:49:08 +00:00
FEAT: inputs and transformation using protospack-v2
This commit is contained in:
@@ -24,7 +24,8 @@ import {
|
||||
TestConnectionRes,
|
||||
} from './dtos/input.model';
|
||||
import { UpdateInputRequest } from './dtos/old_interfaces';
|
||||
import { User } from 'src/authentication/user.decorator';
|
||||
import { RequestUser, User } from 'src/authentication/user.decorator';
|
||||
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
|
||||
|
||||
@ApiTags('inputs')
|
||||
@Controller('inputs')
|
||||
@@ -132,15 +133,18 @@ export class InputsController {
|
||||
}
|
||||
|
||||
@Get()
|
||||
async findAll(@User() user, @Body() body) {
|
||||
async findAll(@User() user: RequestUser) {
|
||||
const { user_id, customer_id, customer_name: customer } = user;
|
||||
this.logger.info(`/input - ON FIND ALL ROUTE`, {
|
||||
user: user.user_id,
|
||||
customer: user.customer_id,
|
||||
});
|
||||
|
||||
const response = await this.inputService.findAll({
|
||||
info: { user: user.user_id, customer: user.customer_id },
|
||||
customer,
|
||||
});
|
||||
const info: Info = {
|
||||
customer,
|
||||
customer_id,
|
||||
user_id,
|
||||
};
|
||||
const response = await this.inputService.findAll(info);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user