-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/update project name backend (#501)
- Loading branch information
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
frontend/src/app/[organisation]/bemanning/api/projects/updateProjectName/route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { putWithToken } from "@/data/apiCallsWithToken"; | ||
import { updateProjectNameBody } from "@/types"; | ||
import { NextResponse } from "next/server"; | ||
import { EngagementReadModel } from "@/api-types"; | ||
|
||
export async function PUT( | ||
request: Request, | ||
{ params }: { params: { organisation: string } }, | ||
) { | ||
const orgUrlKey = params.organisation; | ||
const requestBody = (await request.json()) as updateProjectNameBody; | ||
|
||
const project = | ||
(await putWithToken<EngagementReadModel, updateProjectNameBody>( | ||
`${orgUrlKey}/projects/updateProjectName`, | ||
requestBody, | ||
)) ?? []; | ||
|
||
return NextResponse.json(project); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters