From 9933a3bb070b3ecf8d16bde2e0f4b070db26fb9f Mon Sep 17 00:00:00 2001 From: Danny Adams Date: Sat, 21 Jan 2023 01:12:05 -0500 Subject: [PATCH] Updates to /cli/restore/sharepoint.go Addition of logic for sharepoint page restore. --- src/cli/restore/sharepoint.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/cli/restore/sharepoint.go b/src/cli/restore/sharepoint.go index 1c3a81e89..1b3dac160 100644 --- a/src/cli/restore/sharepoint.go +++ b/src/cli/restore/sharepoint.go @@ -20,6 +20,8 @@ var ( listPaths []string libraryItems []string libraryPaths []string + pageFolders []string + page []string site []string weburl []string ) @@ -76,6 +78,17 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command { utils.ListItemFN, nil, "Restore list items by ID") + fs.StringSliceVar( + &pageFolders, + utils.PageFN, nil, + "Restore site pages by SharePoint site name or url") + + fs.StringSliceVar( + &page, + utils.PageItemFN, nil, + "Restore site page by ID", + ) + // sharepoint info flags // fs.StringVar( @@ -131,6 +144,8 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error { ListPaths: listPaths, LibraryItems: libraryItems, LibraryPaths: libraryPaths, + PageFolders: pageFolders, + Pages: page, Sites: site, WebURLs: weburl, // FileCreatedAfter: fileCreatedAfter,