mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
feat: separate db models from server
This commit is contained in:
1 parent
784ae29ed0
commit
50bf514805
23 files changed
+90
-31
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import jwt from 'jsonwebtoken'
|
||||
import { User } from '@linux-odyssey/models'
|
||||
import bcrypt from 'bcrypt'
|
||||
import config from '../config.js'
|
||||
import User from '../models/user.js'
|
||||
|
||||
export function hashPassword(password) {
|
||||
return bcrypt.hash(password, 10)
|
||||
|
||||
@@ -2,7 +2,7 @@ import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import yaml from 'yaml'
|
||||
|
||||
import Quest from '../models/quest.js'
|
||||
import { Quest } from '@linux-odyssey/models'
|
||||
|
||||
const questDirectory = path.join(process.cwd(), '..', 'quests')
|
||||
|
||||
|
||||
Reference in new issue
Block a user