feat: save page + create event for storage targets
This commit is contained in:
@@ -22,16 +22,9 @@ module.exports = {
|
||||
},
|
||||
PageMutation: {
|
||||
async create(obj, args, context) {
|
||||
const page = await WIKI.db.pages.query().insertAndFetch({
|
||||
path: args.path,
|
||||
title: args.title,
|
||||
description: args.description,
|
||||
const page = await WIKI.db.pages.createPage({
|
||||
...args,
|
||||
isPrivate: false,
|
||||
isPublished: args.isPublished,
|
||||
publishStartDate: args.publishStartDate,
|
||||
publishEndDate: args.publishEndDate,
|
||||
localeCode: args.locale,
|
||||
editorKey: args.editor,
|
||||
authorId: context.req.user.id
|
||||
})
|
||||
return {
|
||||
|
@@ -34,20 +34,22 @@ type PageQuery {
|
||||
|
||||
type PageMutation {
|
||||
create(
|
||||
description: String
|
||||
editor: String
|
||||
content: String!
|
||||
description: String!
|
||||
editor: String!
|
||||
isPublished: Boolean!
|
||||
isPrivate: Boolean
|
||||
isPrivate: Boolean!
|
||||
locale: String!
|
||||
path: String!
|
||||
publishEndDate: Date
|
||||
publishStartDate: Date
|
||||
tags: [String]
|
||||
tags: [String]!
|
||||
title: String!
|
||||
): PageResponse
|
||||
|
||||
update(
|
||||
id: Int!
|
||||
content: String
|
||||
description: String
|
||||
editor: String
|
||||
isPublished: Boolean
|
||||
|
Reference in New Issue
Block a user