Converted main codebase to typescript

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-12-28 13:17:57 +01:00
parent 1d9ded82a4
commit 68fde04bbb
122 changed files with 14230 additions and 1834 deletions

View File

@@ -1,4 +1,4 @@
const { Schema, model } = require("mongoose")
import { Schema, model } from "mongoose"
const guildAppSchema = new Schema({
_id: Schema.Types.ObjectId,
@@ -6,4 +6,4 @@ const guildAppSchema = new Schema({
uuid: { type: String, required: true },
})
module.exports = model("guildapp", guildAppSchema, "guildapp")
export = model("guildapp", guildAppSchema, "guildapp")

View File

@@ -1,4 +1,4 @@
const { Schema, model } = require("mongoose")
import { Schema, model } from "mongoose"
const settingsSchema = new Schema({
_id: Schema.Types.ObjectId,
@@ -6,4 +6,4 @@ const settingsSchema = new Schema({
value: { type: String, required: true },
})
module.exports = model("settings", settingsSchema, "settings")
export = model("settings", settingsSchema, "settings")

View File

@@ -1,4 +1,4 @@
const { Schema, model } = require("mongoose")
import { Schema, model } from "mongoose"
const staffAppSchema = new Schema({
_id: Schema.Types.ObjectId,
@@ -6,4 +6,4 @@ const staffAppSchema = new Schema({
uuid: { type: String, required: true },
})
module.exports = model("staffapp", staffAppSchema, "staffapp")
export = model("staffapp", staffAppSchema, "staffapp")

View File

@@ -1,4 +1,4 @@
const { Schema, model } = require("mongoose")
import { Schema, model } from "mongoose"
const verifySchema = new Schema({
_id: Schema.Types.ObjectId,
@@ -6,4 +6,4 @@ const verifySchema = new Schema({
uuid: { type: String, required: true },
})
module.exports = model("verify", verifySchema, "verify")
export = model("verify", verifySchema, "verify")

View File

@@ -1,11 +1,11 @@
const { Schema, model } = require("mongoose")
import { Schema, model } from "mongoose"
const waitinglistSchema = new Schema({
_id: Schema.Types.ObjectId,
userID: { type: String, required: true },
uuid: { type: String, required: true },
IGN: { type: String, required: true },
timestamp: { type: String, required: true }
timestamp: { type: Number, required: true }
})
module.exports = model("waitinglist", waitinglistSchema, "waitinglist")
export = model("waitinglist", waitinglistSchema, "waitinglist")