-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode.gs
More file actions
28 lines (26 loc) · 833 Bytes
/
Code.gs
File metadata and controls
28 lines (26 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Entry point for the web app.
*/
function doGet(e) {
if (e && e.parameter && e.parameter.mode === 'bootstrap') {
try {
const data = getBootstrapData();
return ContentService.createTextOutput(JSON.stringify({
ok: true,
data
})).setMimeType(ContentService.MimeType.JSON);
} catch (error) {
return ContentService.createTextOutput(JSON.stringify({
ok: false,
error: error && error.message ? error.message : String(error)
})).setMimeType(ContentService.MimeType.JSON);
}
}
return HtmlService.createTemplateFromFile('app/client/index')
.evaluate()
.setTitle('OKRsMatter')
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename).getContent();
}