wikijs-fork/server/models/bruteforce.js

21 lines
395 B
JavaScript
Raw Normal View History

2017-02-09 01:52:37 +00:00
'use strict'
const Mongoose = require('mongoose')
/**
* BruteForce schema
*
* @type {<Mongoose.Schema>}
*/
2016-11-21 01:09:50 +00:00
var bruteForceSchema = Mongoose.Schema({
2017-02-09 01:52:37 +00:00
_id: { type: String, index: 1 },
data: {
count: Number,
lastRequest: Date,
firstRequest: Date
},
expires: { type: Date, index: { expires: '1d' } }
})
2017-02-09 01:52:37 +00:00
module.exports = Mongoose.model('Bruteforce', bruteForceSchema)