Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function editNamedSet(id:string, data: {[key: string]: string}) {
return sendAPI(`/targid/storage/namedset/${id}`, data, 'PUT');
}
export function deleteNamedSet(id:string) {
return sendAPI(`/targid/storage/namedset/${id}`, {}, 'DELETE');
}
export function saveNamedSet(name: string, idType: IDType|string, ids: RangeLike, subType: {key:string, value:string}, description = '') {
const data = {
name,
type: ENamedSetType.NAMEDSET,
creator: retrieve('username', 'Anonymous'),
idType: resolve(idType).id,
ids: parse(ids).toString(),
subTypeKey: subType.key,
subTypeValue: subType.value,
description
};
return sendAPI('/targid/storage/namedsets/', data, 'POST');
}