chore: update endpoint /api/resources for getResourceDetails (#666)

Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
This commit is contained in:
vttran
2026-03-18 17:18:52 +07:00
committed by GitHub
parent 647f82c653
commit daf7257292
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -36,9 +36,7 @@ describe("getResourceDetails", () => {
const result = await getResourceDetails(resourceId);
expect(api.get).toHaveBeenCalledWith(
`linagora.esn.resource/api/resources/${resourceId}`
);
expect(api.get).toHaveBeenCalledWith(`api/resources/${resourceId}`);
expect(result).toEqual(mockResource);
});
});
+1 -1
View File
@@ -45,7 +45,7 @@ export async function getUserDetails(id: string): Promise<OpenPaasUserData> {
export async function getResourceDetails(id: string): Promise<ResourceData> {
const resource = await api
.get(`linagora.esn.resource/api/resources/${encodeURIComponent(id)}`)
.get(`api/resources/${encodeURIComponent(id)}`)
.json();
return resource as ResourceData;
}