Remove redis and add healthcheck endpoint

This commit is contained in:
2026-08-17 22:50:49 +03:30
parent 1618eae69f
commit 86655f2b69
10 changed files with 66 additions and 146 deletions
+26
View File
@@ -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