Skip to content

Commit

Permalink
refactor(planning-units): setting lock status is now post 🪄
Browse files Browse the repository at this point in the history
  • Loading branch information
kgajowy committed Oct 18, 2021
1 parent ca44d3d commit ea9bd95
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/apps/api/src/modules/scenarios/scenarios.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export class ScenariosController {

@ApiTags(asyncJobTag)
@ApiOkResponse()
@Patch(':id/planning-units')
@Post(':id/planning-units')
async changePlanningUnits(
@Param('id', ParseUUIDPipe) id: string,
@Body() input: UpdateScenarioPlanningUnitLockStatusDto,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const WhenChangingPlanningUnitInclusivity = async (
) =>
(
await request(app.getHttpServer())
.patch(`/api/v1/scenarios/${scenarioId}/planning-units`)
.post(`/api/v1/scenarios/${scenarioId}/planning-units`)
.set('Authorization', `Bearer ${jwtToken}`)
.send(getDtoByIds(puIds, []))
).body;
2 changes: 1 addition & 1 deletion app/hooks/scenarios/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export function useScenarioPU(sid) {

export function useSaveScenarioPU({
requestConfig = {
method: 'PATCH',
method: 'POST',
},
}: UseSaveScenarioPUProps) {
const queryClient = useQueryClient();
Expand Down
2 changes: 1 addition & 1 deletion app/hooks/scenarios/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface UseUploadScenarioPUProps {

export interface UploadScenarioPUProps {
id?: string,
data: any,
data: FormData,
}

export interface UseDownloadScenarioCostSurfaceProps {
Expand Down

0 comments on commit ea9bd95

Please sign in to comment.