diff --git a/backend/src/modules/resource/occupation.controller.ts b/backend/src/modules/resource/occupation.controller.ts index 15513f0f..36d80c2c 100644 --- a/backend/src/modules/resource/occupation.controller.ts +++ b/backend/src/modules/resource/occupation.controller.ts @@ -1,9 +1,9 @@ import { + Body, Controller, Get, HttpException, HttpStatus, - Param, Put, } from '@nestjs/common'; import { ResourceService } from '@/modules/resource/resource.service'; @@ -21,12 +21,12 @@ export class OccupationController { return occupation; } - @Put(':type') - async upgradeResource(@Param() params: OccupationTypeDto): Promise { + @Put() + async changeOccupation(@Body() body: OccupationTypeDto): Promise { const { id } = await getUser(); try { - await this.resourceService.changeOccupation(id, params.occupation); + await this.resourceService.changeOccupation(id, body.occupation); } catch (e) { throw new HttpException( 'Failed to change occupation: ' + e, diff --git a/frontend/components/ProposeTrade.vue b/frontend/components/ProposeTrade.vue index 91279427..f64311d6 100644 --- a/frontend/components/ProposeTrade.vue +++ b/frontend/components/ProposeTrade.vue @@ -1,5 +1,5 @@ diff --git a/frontend/pages/treaties.vue b/frontend/pages/treaties.vue index c4e1f8ca..8348430d 100644 --- a/frontend/pages/treaties.vue +++ b/frontend/pages/treaties.vue @@ -11,8 +11,4 @@