Update to /connector/sharepoint/site_page.go
Issue #2169: Delete API added for SharePoint Page.
This commit is contained in:
parent
ca641e0116
commit
d16b13bd64
@ -79,3 +79,18 @@ func fetchPageOptions() *sites.ItemPagesRequestBuilderGetRequestConfiguration {
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
// DeleteSitePage removes the selected page from the SharePoint Site
|
||||
// https://learn.microsoft.com/en-us/graph/api/sitepage-delete?view=graph-rest-beta
|
||||
func DeleteSitePage(
|
||||
ctx context.Context,
|
||||
serv graph.Servicer,
|
||||
siteID, pageID string,
|
||||
) error {
|
||||
err := serv.Client().SitesById(siteID).PagesById(pageID).Delete(ctx, nil)
|
||||
if err != nil {
|
||||
return support.ConnectorStackErrorTraceWrap(err, "deleting page: "+pageID)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user