fix(services): encode URI in getProject and improve test assertions
This commit is contained in:
1 parent
ca22a0e109
commit
a57e8ba7df
2 files changed
+118
-1
No files matched your search
@@ -54,7 +54,9 @@ export async function getProject(
|
||||
client?: OpenProjectClient
|
||||
): Promise<ProjectDetail> {
|
||||
const opClient = resolveClient(client);
|
||||
const response = await opClient.get<HalResource>(`projects/${idOrIdentifier}`);
|
||||
const response = await opClient.get<HalResource>(
|
||||
`projects/${encodeURIComponent(String(idOrIdentifier))}`
|
||||
);
|
||||
return normalizeProject(response);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user