upsertResource

Function

Given an item, and owner, Search for if the resource exists and if does, update it, otherwise add it. Returns a url for the item.

  • upsertResource(id: string, owner: string, resource: any, name: string, ro: IUserRequestOptions, prefix: string) : Promise<string>

Parameters

Parameter Type Default Notes
id Required string
owner Required string
resource Required any
name Required string
ro Required IUserRequestOptions
prefix Optional string ""

Returns

{Promise}

Promise<string>

Function defined in common/src/resources/upsertResource.ts:20