feat: core improvements + local fs provider + UI fixes

This commit is contained in:
NGPixel
2018-07-29 22:23:33 -04:00
parent 803d86ff63
commit 2817c72ec3
65 changed files with 482 additions and 264 deletions

View File

@@ -4,15 +4,15 @@
module.exports = {
Query: {
documents(obj, args, context, info) {
return WIKI.db.Document.findAll({ where: args })
return WIKI.models.Document.findAll({ where: args })
}
},
Mutation: {
createDocument(obj, args) {
return WIKI.db.Document.create(args)
return WIKI.models.Document.create(args)
},
deleteDocument(obj, args) {
return WIKI.db.Document.destroy({
return WIKI.models.Document.destroy({
where: {
id: args.id
},
@@ -20,7 +20,7 @@ module.exports = {
})
},
modifyDocument(obj, args) {
return WIKI.db.Document.update({
return WIKI.models.Document.update({
title: args.title,
subtitle: args.subtitle
}, {
@@ -28,7 +28,7 @@ module.exports = {
})
},
moveDocument(obj, args) {
return WIKI.db.Document.update({
return WIKI.models.Document.update({
path: args.path
}, {
where: { id: args.id }