-
Notifications
You must be signed in to change notification settings - Fork 339
Enhancement: Extract commonly used functions into a shared file in page commands #6621
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
Comments
@mkm17 awesome suggestion 👍. |
@Adam-it Yes, the aim is to reduce duplication, as some functions are already exported to the "util" file named Page.ts. I will compile a list of links to certain files. |
Thanks for the confirmation. |
Hi @Adam-it , you was right, GetSiteId, GetWebId and GetListId can be exported to spo.ts. In spo.ts there is already the getSiteId function but it is using Ms Graph endpoint. **_api/site?$select=Id _api/site?$select=Id used in contenttype-add _api/web?$select=Id used in contenttype-add getListId And this function from page.ts can be used for /checkoutpage which is used in |
Hi @Adam-it what do you think, can I make this change? |
Totally 👍 |
Hi, I have noticed that some functions are duplicated in page commands. The idea is to analyze them and extract them into a shared file, like Page.ts.
Here are the functions I have found so far.
_api/site?$select=Id used in
contenttype-add
contenttype-field-remove
contenttype field-set
contenttype-set
page-header-set
site-admin-add
_api/web?$select=Id used in
contenttype-add
contenttype-field-remove
contenttype field-set
contenttype-set
page-header-set
site-admin-add
/checkoutpage used in
page-clientsidewebpart-add
page-header-set
page-section-add
The text was updated successfully, but these errors were encountered: