Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async post(data: PostData, options: RequestOptions = {}): Promise {
if (isEmpty(data)) throw new TSError('Asset stream must not be empty');
const results = await super.post('/assets', data, options);
return this.parse(results);
}
async delete(id: string, searchOptions: SearchOptions = {}): Promise {
if (isEmpty(id)) throw new TSError('Asset delete requires a ID');
const results = await super.delete(`/assets/${id}`, searchOptions);
return this.parse(results);
}