Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Added support for HubSiteId while creating modern sites #553

Merged
merged 2 commits into from
Mar 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Feature : Added support for HubSiteId while creating modern sites
  • Loading branch information
Gautam Sheth committed Mar 14, 2019
commit 9f8e13a6f7ba23ee216808f6b199a538427305f0
5 changes: 4 additions & 1 deletion packages/sp/src/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ export class Site extends SharePointQueryableInstance {
description = "",
classification = "",
siteDesignId = "00000000-0000-0000-0000-000000000000",
hubSiteId = "00000000-0000-0000-0000-000000000000",
): Promise<void> {

const props = {
Classification: classification,
Description: description,
HubSiteId: hubSiteId,
Lcid: lcid,
ShareByEmailEnabled: shareByEmailEnabled,
SiteDesignId: siteDesignId,
Expand Down Expand Up @@ -221,6 +223,7 @@ export class Site extends SharePointQueryableInstance {
description = "",
classification = "",
owners?: string[],
hubSiteId = "00000000-0000-0000-0000-000000000000",
): Promise<void> {

const postBody = jsS({
Expand All @@ -230,7 +233,7 @@ export class Site extends SharePointQueryableInstance {
optionalParams: {
Classification: classification,
CreationOptions: {
"results": [`SPSiteLanguage:${lcid}`],
"results": [`SPSiteLanguage:${lcid}`, `HubSiteId:${hubSiteId}`],
},
Description: description,
Owners: {
Expand Down