Skip to content

Commit

Permalink
Fix missing imports on code page
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermenezes committed Feb 19, 2021
1 parent 63bf2c6 commit 790e90d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/code/[code].js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import React from 'react';
import getConfig from 'next/config';
import Head from 'next/head';
import Text from '@codeday/topo/Atom/Text';
import Button from '@codeday/topo/Atom/Button';
import Page from '../../components/Page';
import { getSession } from 'next-auth/client';
import { getSession, signIn } from 'next-auth/client';
import jwt from 'jsonwebtoken';
import { tryAuthenticatedApiQuery } from '../../util/api';

Expand All @@ -18,9 +19,8 @@ export const getServerSideProps = async ({ req, params }) => {
let success = false;
const token = jwt.sign({ id: session.user?.id }, serverRuntimeConfig.auth0.hookSharedSecret)
let { result, error } = await tryAuthenticatedApiQuery(AddRole, {code: params.code}, token);
console.log(result)
if (result && !error) success = true;

return {
props: {
success
Expand Down

0 comments on commit 790e90d

Please sign in to comment.