enables automatic graphql-playground auth middleware, enables create mutation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user