chore: update endpoint /api/resources for getResourceDetails (#666)
Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user