enables automatic graphql-playground auth middleware, enables create mutation

This commit is contained in:
James
2020-04-11 11:35:50 -04:00
parent d6f8565636
commit b678eba94b
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ const create = async (options) => {
// Await pre-hook here
const doc = await options.Model.create(options.data);
const doc = await options.model.create(options.data);
// Await post hook here

View File

@@ -6,7 +6,7 @@ const { create } = require('../queries');
const createHandler = async (req, res) => {
try {
const doc = await create({
Model: req.model,
model: req.model,
data: req.body,
});