fix: Add a build system for the backend
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { pbkdf2Sync } from "crypto";
|
||||
|
||||
import { IUser } from "shared/user";
|
||||
|
||||
export function isAuthenticated(token: string): Promise<boolean> {
|
||||
return new Promise((res, rej) => {
|
||||
// TODO
|
||||
@@ -7,7 +9,7 @@ export function isAuthenticated(token: string): Promise<boolean> {
|
||||
});
|
||||
}
|
||||
|
||||
export function performLogin(username: string, password: string): Promise<any | {}> {
|
||||
export function performLogin(username: string, password: string): Promise<IUser | {}> {
|
||||
return new Promise((res, rej) => {
|
||||
// Hash the password
|
||||
// TODO: Fetch the salt
|
||||
@@ -18,8 +20,9 @@ export function performLogin(username: string, password: string): Promise<any |
|
||||
res({
|
||||
username: "Polynom",
|
||||
uid: "1",
|
||||
showWelcome: false,
|
||||
showWelcome: true,
|
||||
classId: "test",
|
||||
score: 4,
|
||||
|
||||
sessionToken: "abc123",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user