Update to /connector/sharepoint/data_collections.go
Finalize the backup workflow for SharePoint.Pages.
This commit is contained in:
parent
3c7c156e72
commit
0f16e5768f
@ -10,7 +10,6 @@ import (
|
|||||||
"github.com/alcionai/corso/src/internal/connector/support"
|
"github.com/alcionai/corso/src/internal/connector/support"
|
||||||
"github.com/alcionai/corso/src/internal/data"
|
"github.com/alcionai/corso/src/internal/data"
|
||||||
"github.com/alcionai/corso/src/internal/observe"
|
"github.com/alcionai/corso/src/internal/observe"
|
||||||
"github.com/alcionai/corso/src/pkg/account"
|
|
||||||
"github.com/alcionai/corso/src/pkg/control"
|
"github.com/alcionai/corso/src/pkg/control"
|
||||||
"github.com/alcionai/corso/src/pkg/logger"
|
"github.com/alcionai/corso/src/pkg/logger"
|
||||||
"github.com/alcionai/corso/src/pkg/path"
|
"github.com/alcionai/corso/src/pkg/path"
|
||||||
@ -76,6 +75,18 @@ func DataCollections(
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, support.WrapAndAppend(site, err, errs)
|
return nil, support.WrapAndAppend(site, err, errs)
|
||||||
}
|
}
|
||||||
|
case path.PagesCategory:
|
||||||
|
spcs, err = collectPages(
|
||||||
|
ctx,
|
||||||
|
serv,
|
||||||
|
tenantID,
|
||||||
|
site,
|
||||||
|
scope,
|
||||||
|
su,
|
||||||
|
ctrlOpts)
|
||||||
|
if err != nil {
|
||||||
|
return nil, support.WrapAndAppend(site, err, errs)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
collections = append(collections, spcs...)
|
collections = append(collections, spcs...)
|
||||||
@ -156,10 +167,10 @@ func collectLibraries(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// collectPages constructs a sharepoint Collections struct and Get()s the associated
|
// collectPages constructs a sharepoint Collections struct and Get()s the associated
|
||||||
// M365 IDs for the associated Pages
|
// M365 IDs for the associated Pages.
|
||||||
|
// TODO: Credentials necessary to create separate HTTP client
|
||||||
func collectPages(
|
func collectPages(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
creds account.M365Config,
|
|
||||||
serv graph.Servicer,
|
serv graph.Servicer,
|
||||||
tenantID, siteID string,
|
tenantID, siteID string,
|
||||||
scope selectors.SharePointScope,
|
scope selectors.SharePointScope,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user