use default import for user model

This commit is contained in:
Nathaniel Tampus
2023-03-25 19:13:00 +08:00
parent 4af8dc6d13
commit ee8f9a58fd
2 changed files with 10 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ import { hash, verify } from "argon2";
import { activeGames } from "../db/models/game.model.js"; import { activeGames } from "../db/models/game.model.js";
import { io } from "../server.js"; import { io } from "../server.js";
import * as UserModel from "../db/models/user.model.js"; import UserModel from "../db/models/user.model.js";
export const getCurrentSession = async (req: Request, res: Response) => { export const getCurrentSession = async (req: Request, res: Response) => {
try { try {

View File

@@ -80,3 +80,12 @@ export const remove = async (id: number) => {
return null; return null;
} }
}; };
const UserModel = {
create,
find,
update,
remove
};
export default UserModel;