mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 17:23:18 +00:00
🎨 Convert id bigint to string
This commit is contained in:
1 parent
79894e6f27
commit
7089287016
18 files changed
+83
-63
No files matched your search
@@ -1,13 +1,12 @@
|
||||
import mongoose, { Schema, Types } from "mongoose";
|
||||
import { Long as MongoTypeLong } from "mongodb";
|
||||
require("mongoose-long")(mongoose);
|
||||
|
||||
const userSchema = new Schema({
|
||||
id: MongoTypeLong,
|
||||
id: String,
|
||||
});
|
||||
|
||||
const messageSchema = new Schema({
|
||||
id: MongoTypeLong,
|
||||
id: String,
|
||||
content: String,
|
||||
});
|
||||
const message = mongoose.model("message", messageSchema, "messages");
|
||||
|
||||
Reference in new issue
Block a user