feat: admin list pages + editor media ui imrprovements

This commit is contained in:
Nick
2019-04-07 18:10:44 -04:00
parent 1a788057b2
commit 5db7dcb266
5 changed files with 119 additions and 26 deletions

View File

@@ -28,6 +28,21 @@ module.exports = {
}
}
},
async list (obj, args, context, info) {
return WIKI.models.pages.query().column([
'id',
'path',
{ locale: 'localeCode' },
'title',
'description',
'isPublished',
'isPrivate',
'privateNS',
'contentType',
'createdAt',
'updatedAt'
])
}
},
PageMutation: {
async create(obj, args, context) {

View File

@@ -26,6 +26,8 @@ type PageQuery {
path: String
locale: String
): PageSearchResponse! @auth(requires: ["manage:system", "read:pages"])
list: [PageListItem!]! @auth(requires: ["manage:system"])
}
# -----------------------------------------------
@@ -108,3 +110,17 @@ type PageSearchResult {
path: String!
locale: String!
}
type PageListItem {
id: Int!
path: String!
locale: String!
title: String
description: String
contentType: String!
isPublished: Boolean!
isPrivate: Boolean!
privateNS: String
createdAt: Date!
updatedAt: Date!
}