feat: Remove shared/

This commit is contained in:
Alexander Polynomdivision
2018-09-29 15:06:14 +02:00
parent 65070b1f5b
commit fdaa9cb8f3
8 changed files with 89 additions and 80 deletions

View File

@@ -2,7 +2,7 @@ import { pbkdf2Sync, randomBytes } from "crypto";
import { Db } from "mongodb";
import { IUser } from "shared/user";
import { IUser } from "../models/user";
export async function isAuthenticated(token: string, db: Db): Promise<boolean> {
// See if we can find a session with that token
@@ -34,6 +34,8 @@ export async function performLogin(username: string, password: string, db: Db):
//@ts-ignore
classId: user.classId,
lastReview: user.lastReview,
// TODO: Implement
score: 4,
sessionToken,