diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-06-11 15:39:47 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-06-11 15:39:47 -0400 |
| commit | 420774e164759dd52732a6f35c92f54aec6335e4 (patch) | |
| tree | 6c022811ff357bfd80f1c4daf5c18c379e55ac49 /backend/src/resolvers | |
| parent | 748dc8f8acb3cdc94a4f98704504d221b085ccab (diff) | |
should I record?
Diffstat (limited to 'backend/src/resolvers')
| -rw-r--r-- | backend/src/resolvers/Mutation.js | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/backend/src/resolvers/Mutation.js b/backend/src/resolvers/Mutation.js index 2a67da5..0f1d9ba 100644 --- a/backend/src/resolvers/Mutation.js +++ b/backend/src/resolvers/Mutation.js @@ -81,9 +81,6 @@ const mutations = { }; // 1. find the item const item = await ctx.db.query.item({ where }, `{ user {id}, title, id, description }`); - console.log(item.user); - console.log('-----------------'); - console.log(ctx.request.user); // 2. if they 1. Don't own it AND 2. aren't an admin if (item.user.id !== ctx.request.user.id && !ctx.request.user.permissions.includes('ADMIN')) { throw new Error("You aren't allowed to delete that item!"); @@ -91,7 +88,6 @@ const mutations = { // 3. remove any orderItems this item is in - return ctx.db.mutation.deleteItem({ where }, info); }, |
