unlinkSiteAndPage

Function

Unlink a Page from a Site and vice-versa This is a super tolerant function. It can be passed ids, models or a mix. It will handle either the site or the page items being missing It will handle cases where the current user lacks update privs to either item or rights to change the sharing. Of course in those cases we clearly can't make the changes, and this function will resolve as though they were made, usually the UI tier will have ensured that the current user has write access to at least one of the main entities

  • unlinkSiteAndPage(unlinkRequestOptions: {
    authentication:
    UserSession
    pageId:
    string
    pageModel:
    IModel
    siteId:
    string
    siteModel:
    IModel
    }) : Promise<{
    pageModel:
    IModel
    siteModel:
    IModel
    }>

Parameters

Parameter Type Default Notes
unlinkRequestOptions Required {
authentication:
UserSession
pageId:
string
pageModel:
IModel
siteId:
string
siteModel:
IModel
}

Returns

Promise<{
pageModel:
IModel
siteModel:
IModel
}>

Function defined in sites/src/unlink-site-and-page.ts:24