Skip to content

Commit

Permalink
add async/await
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkie committed Dec 4, 2020
1 parent 33200d3 commit fb2b3b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified prisma/dev.db
Binary file not shown.
6 changes: 3 additions & 3 deletions src/resolvers/Mutation.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const { APP_SECRET, getUserId } = require('../utils');
const { APP_SECRET } = require('../utils');

function post(parent, args, context, info) {
async function post(parent, args, context, info) {
const { userId } = context;

const newLink = context.prisma.link.create({
const newLink = await context.prisma.link.create({
data: {
url: args.url,
description: args.description,
Expand Down

0 comments on commit fb2b3b4

Please sign in to comment.