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,19 +4,19 @@
module.exports = {
Query: {
comments(obj, args, context, info) {
return WIKI.db.Comment.findAll({ where: args })
return WIKI.models.Comment.findAll({ where: args })
}
},
Mutation: {
createComment(obj, args) {
return WIKI.db.Comment.create({
return WIKI.models.Comment.create({
content: args.content,
author: args.userId,
document: args.documentId
})
},
deleteComment(obj, args) {
return WIKI.db.Comment.destroy({
return WIKI.models.Comment.destroy({
where: {
id: args.id
},
@@ -24,7 +24,7 @@ module.exports = {
})
},
modifyComment(obj, args) {
return WIKI.db.Comment.update({
return WIKI.models.Comment.update({
content: args.content
}, {
where: { id: args.id }