Remove redis and add healthcheck endpoint
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const loginAttemptSchema = new mongoose.Schema(
|
||||
{
|
||||
key: {
|
||||
type: String,
|
||||
required: true,
|
||||
unique: true,
|
||||
index: true,
|
||||
},
|
||||
attempts: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
expiresAt: {
|
||||
type: Date,
|
||||
required: true,
|
||||
index: { expires: 0 },
|
||||
},
|
||||
},
|
||||
{ timestamps: true }
|
||||
)
|
||||
|
||||
const LoginAttempt = mongoose.model('LoginAttempt', loginAttemptSchema)
|
||||
|
||||
module.exports = LoginAttempt
|
||||
Reference in New Issue
Block a user