Skip to content

Commit

Permalink
fix(arcgis-rest-portal): use deleteRelationship not removeRelationship
Browse files Browse the repository at this point in the history
Previous implementation used non-existant /removeRelationship end-point. Changed to the correct
/deleteRelationship url

AFFECTS PACKAGES:
@esri/arcgis-rest-portal

ISSUES CLOSED: #739
  • Loading branch information
dbouwman committed Aug 31, 2020
1 parent 1ac3ab2 commit 890e485
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-portal/src/items/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function removeItemRelationship(
return determineOwner(requestOptions).then(owner => {
const url = `${getPortalUrl(
requestOptions
)}/content/users/${owner}/removeRelationship`;
)}/content/users/${owner}/deleteRelationship`;

const options = appendCustomParams<IManageItemRelationshipOptions>(
requestOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/arcgis-rest-portal/test/items/remove.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe("search", () => {
expect(fetchMock.called()).toEqual(true);
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
expect(url).toEqual(
"https://myorg.maps.arcgis.com/sharing/rest/content/users/casey/removeRelationship"
"https://myorg.maps.arcgis.com/sharing/rest/content/users/casey/deleteRelationship"
);
expect(options.method).toBe("POST");
expect(options.body).toContain("originItemId=3ef");
Expand Down

0 comments on commit 890e485

Please sign in to comment.