summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/models/User.ts2
-rw-r--r--src/util/Database.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/models/User.ts b/src/models/User.ts

index fb914fa0..9f447d91 100644 --- a/src/models/User.ts +++ b/src/models/User.ts
@@ -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: [ { diff --git a/src/util/Database.ts b/src/util/Database.ts
index f5269675..fee3cc31 100644 --- a/src/util/Database.ts +++ b/src/util/Database.ts
@@ -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;