fix(timesheets): changed function calls from query to body

This commit is contained in:
Matthieu Haineault 2025-11-12 09:40:01 -05:00
parent d88f8727ad
commit 40072af4a6
2 changed files with 3 additions and 20 deletions

View File

@ -251,24 +251,7 @@
"/timesheets": { "/timesheets": {
"get": { "get": {
"operationId": "TimesheetController_getTimesheetByPayPeriod", "operationId": "TimesheetController_getTimesheetByPayPeriod",
"parameters": [ "parameters": [],
{
"name": "year",
"required": true,
"in": "query",
"schema": {
"type": "number"
}
},
{
"name": "period_number",
"required": true,
"in": "query",
"schema": {
"type": "number"
}
}
],
"responses": { "responses": {
"200": { "200": {
"description": "" "description": ""

View File

@ -16,8 +16,8 @@ export class TimesheetController {
@Get() @Get()
getTimesheetByPayPeriod( getTimesheetByPayPeriod(
@Req() req, @Req() req,
@Query('year', ParseIntPipe) year: number, @Body('year', ParseIntPipe) year: number,
@Query('period_number', ParseIntPipe) period_number: number @Body('period_number', ParseIntPipe) period_number: number
) { ) {
const email = req.user?.email; const email = req.user?.email;
if (!email) throw new UnauthorizedException('Unauthorized User'); if (!email) throw new UnauthorizedException('Unauthorized User');