var minisrv_service_file = true;
var pagestore_exists = session_data.pagestore.pagestoreExists();
var docName = request_headers.query.docName;
if (pagestore_exists != true)
{
session_data.pagestore.createPagestore();
headers = `300 OK
Location: wtv-author:/documents`
} else {
var page = session_data.pagestore.loadPage(docName)
var discardAlert = function (docName) {
return new clientShowAlert({
'image': this.minisrv_config.config.service_logo,
'message': "Would you like to permanently discard this document and all of its contents?",
'buttonlabel1': "Don't Discard",
'buttonaction1': "client:donothing",
'buttonlabel2': "Discard",
'buttonaction2': "delete-doc?docName=" + docName,
'sound': false,
'noback': true,
}).getURL();
}
var unpublishAlert = function (docName) {
return new clientShowAlert({
'image': this.minisrv_config.config.service_logo,
'message': "Would you like to unpublish this document? You can republish it later.",
'buttonlabel1': "Don't Unpublish",
'buttonaction1': "client:donothing",
'buttonlabel2': "Unpublish",
'buttonaction2': "publish?docName=" + docName + "&unpublish=1",
'sound': false,
'noback': true,
}).getURL();
}
headers = `200 OK
Connection: Keep-Alive
Content-Type: text/html`
data = `
Page Settings
`;
}