Atualização repositorio

This commit is contained in:
eduardoestevao-appsoluti
2025-03-27 19:29:17 -03:00
parent b104682e1d
commit 41e56dda12
70 changed files with 15389 additions and 125 deletions

View File

@@ -0,0 +1,51 @@
/* eslint-disable prettier/prettier */
/* eslint-disable @typescript-eslint/no-unused-vars */
/*
https://docs.nestjs.com/controllers#controllers
*/
import { Body, Controller, Get, Param, Post } from '@nestjs/common';
import { LogisticService } from './logistic.service';
import { CarOutDelivery } from 'src/core/models/car-out-delivery.model';
import { CarInDelivery } from 'src/core/models/car-in-delivery.model';
@Controller('api/v1/logistic')
export class LogisticController {
constructor( private readonly logisticService: LogisticService) {}
@Get('expedicao')
getExpedicao() {
try {
return this.logisticService.getExpedicao();
} catch (err) {
console.log(err);
}
}
@Get('employee')
getEmployee() {
return this.logisticService.getEmployee();
}
@Get('deliveries/:placa')
getDelivery(@Param('placa') placa: string) {
return this.logisticService.getDeliveries(placa);
}
@Get('status-car/:placa')
getStatusCar(@Param('placa') placa: string) {
return this.logisticService.getStatusCar(placa);
}
@Post('create')
createOutCar(@Body() data: CarOutDelivery) {
return this.logisticService.createCarOut(data);
}
@Post('return-car')
createinCar(@Body() data: CarInDelivery) {
return this.logisticService.createCarIn(data);
}
}