Skip to content

Commit

Permalink
refactor: remove serializeGroup method
Browse files Browse the repository at this point in the history
AFFECTS PACKAGES:
@esri/arcgis-rest-groups

BREAKING CHANGE:
remove serializeGroup helper method from groups package
  • Loading branch information
jgravois committed Apr 11, 2019
1 parent 9ffd227 commit 9a63219
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/arcgis-rest-groups/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
/* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc.
* Apache-2.0 */

import { IUserRequestOptions } from "@esri/arcgis-rest-auth";

import { IItemUpdate, IGroupAdd, IGroup } from "@esri/arcgis-rest-common-types";

export interface IGroupIdRequestOptions extends IUserRequestOptions {
id: string;
}

/**
* (Deprecated) Serialize a group into a json format accepted by the Portal API
* for create and update operations.
*
* @param group IGroup to be serialized
* @returns a formatted JSON object to be sent to Portal
* @private
*/
/* istanbul ignore next */
export function serializeGroup(group: IGroupAdd | IItemUpdate | IGroup): any {
const clone = JSON.parse(JSON.stringify(group));
const { tags = [] } = group;
clone.tags = tags.join(", ");
return clone;
}

0 comments on commit 9a63219

Please sign in to comment.