Commit 790d2b2e authored by Blockchain-vn's avatar Blockchain-vn

refactor: warning - API description.md

parent d505ed0d
This diff is collapsed.
...@@ -125,7 +125,6 @@ CourseSchema.virtual('availableSlots').get(function (this: ICourse) { ...@@ -125,7 +125,6 @@ CourseSchema.virtual('availableSlots').get(function (this: ICourse) {
}); });
// Index for better query performance // Index for better query performance
CourseSchema.index({ code: 1 });
CourseSchema.index({ status: 1 }); CourseSchema.index({ status: 1 });
CourseSchema.index({ instructor: 1 }); CourseSchema.index({ instructor: 1 });
CourseSchema.index({ name: 'text' }); CourseSchema.index({ name: 'text' });
......
...@@ -79,7 +79,6 @@ const TermSchema: Schema = new Schema({ ...@@ -79,7 +79,6 @@ const TermSchema: Schema = new Schema({
}); });
// Index for better query performance // Index for better query performance
TermSchema.index({ name: 1 }, { unique: true });
TermSchema.index({ status: 1 }); TermSchema.index({ status: 1 });
TermSchema.index({ startDate: 1, endDate: 1 }); TermSchema.index({ startDate: 1, endDate: 1 });
TermSchema.index({ name: 'text' }); TermSchema.index({ name: 'text' });
......
...@@ -53,7 +53,6 @@ const UserSessionSchemaEntity: Schema = new Schema( ...@@ -53,7 +53,6 @@ const UserSessionSchemaEntity: Schema = new Schema(
// TTL index to automatically remove expired sessions // TTL index to automatically remove expired sessions
UserSessionSchemaEntity.index({ refresh_expires_at: 1 }, { expireAfterSeconds: 0 }); UserSessionSchemaEntity.index({ refresh_expires_at: 1 }, { expireAfterSeconds: 0 });
UserSessionSchemaEntity.index({ session_token: 1 });
UserSessionSchemaEntity.index({ user: 1 }); UserSessionSchemaEntity.index({ user: 1 });
export const UserSession = mongoose.models.UserSession || mongoose.model<IUserSession>('UserSession', UserSessionSchemaEntity); export const UserSession = mongoose.models.UserSession || mongoose.model<IUserSession>('UserSession', UserSessionSchemaEntity);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment