|
|
|
@ -79,6 +79,8 @@ export default class Book {
|
|
|
|
|
switch (task) {
|
|
|
|
|
case DataEvent.API_PAGE_CREATE:
|
|
|
|
|
case DataEvent.API_PAGE_WRITE:
|
|
|
|
|
var layout = 'page';
|
|
|
|
|
if (body.layout !== 'page') layout = body.layout;
|
|
|
|
|
var pageWrite =
|
|
|
|
|
'---\n' +
|
|
|
|
|
'id: ' +
|
|
|
|
@ -94,7 +96,7 @@ export default class Book {
|
|
|
|
|
body.feature +
|
|
|
|
|
'\n' +
|
|
|
|
|
'layout: ' +
|
|
|
|
|
'page' +
|
|
|
|
|
layout +
|
|
|
|
|
'\n' +
|
|
|
|
|
'tags: ' +
|
|
|
|
|
body.tags +
|
|
|
|
@ -139,8 +141,9 @@ export default class Book {
|
|
|
|
|
response = {
|
|
|
|
|
type: DataEvent.PAGE_ADDED,
|
|
|
|
|
message: 'New Page Created',
|
|
|
|
|
id: body.page_uuid
|
|
|
|
|
id: body.uuid
|
|
|
|
|
};
|
|
|
|
|
resolve(response);
|
|
|
|
|
} else {
|
|
|
|
|
response = {
|
|
|
|
|
type: DataEvent.PAGE_UPDATED,
|
|
|
|
@ -210,8 +213,7 @@ export default class Book {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tags = _.orderBy(tags, ['tag_name'], ['asc']);
|
|
|
|
|
settings.saveTags(tags).then(response => {
|
|
|
|
|
console.log('RESPONSE', response);
|
|
|
|
|
settings.saveTags(tags).then(() => {
|
|
|
|
|
render
|
|
|
|
|
.publishTags(pages)
|
|
|
|
|
.then(response => {
|
|
|
|
|