UNPKG

@pnp/cli-microsoft365

Version:

Manage Microsoft 365 and SharePoint Framework projects on any platform

33 lines 1.1 kB
import request from '../../../../request.js'; import { spo } from '../../../../utils/spo.js'; import SpoCommand from '../../../base/SpoCommand.js'; import commands from '../../commands.js'; class SpoHomeSiteGetCommand extends SpoCommand { get name() { return commands.HOMESITE_GET; } get description() { return 'Gets information about the Home Site'; } async commandAction(logger) { try { const spoUrl = await spo.getSpoUrl(logger, this.debug); const requestOptions = { url: `${spoUrl}/_api/SP.SPHSite/Details`, headers: { accept: 'application/json;odata=nometadata' }, responseType: 'json' }; const res = await request.get(requestOptions); if (!res["odata.null"]) { await logger.log(res); } } catch (err) { this.handleRejectedODataJsonPromise(err); } } } export default new SpoHomeSiteGetCommand(); //# sourceMappingURL=homesite-get.js.map