mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 15:13:05 +00:00
🐛 fix User Model guilds
This commit is contained in:
1 parent
6fbfcac1ba
commit
79c4fd55fc
6 files changed
+7
-4
No files matched your search
+1
-1
@@ -138,10 +138,10 @@ export const UserSchema = new Schema({
|
||||
email: String,
|
||||
flags: Types.Long, // TODO: automatically convert Types.Long to BitField of UserFlags
|
||||
public_flags: Types.Long,
|
||||
guilds: [Types.Long], // array of guild ids the user is part of
|
||||
user_data: {
|
||||
fingerprints: [String],
|
||||
hash: String, // hash of the password, salt is saved in password (bcrypt)
|
||||
guilds: [Types.Long], // array of guild ids the user is part of
|
||||
valid_tokens_since: Date, // all tokens with a previous issue date are invalid
|
||||
relationships: [
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@ import { ChangeStream, ChangeEvent, Long } from "mongodb";
|
||||
import EventEmitter from "events";
|
||||
const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPreference=secondaryPreferred";
|
||||
|
||||
console.log(`[DB] connect: ${uri}`);
|
||||
|
||||
const connection = mongoose.createConnection(uri, { autoIndex: true });
|
||||
|
||||
export default <Connection>connection;
|
||||
|
||||
Reference in new issue
Block a user