refactor models to typescript

This commit is contained in:
wancat committed 2024-02-07 10:20:19 +08:00
1 parent 253bd04588
commit ee03b9999e
16 files changed
+3 -1

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import mongoose from 'mongoose'
export { default as User } from './user.js'
export { default as Quest } from './quest.js'
export { default as Session } from './session.js'
export { default as Command } from './command.js'
export { default as UserProfile } from './userProfile.js'
export default async function connectDB(uri) {
const db = await mongoose.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true,
})
return db.connection.getClient()
}