mirror of https://github.com/requarks/wiki
parent
94fe4bbf14
commit
2cf8f2c247
@ -0,0 +1,20 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
const modb = require('mongoose');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BruteForce schema
|
||||||
|
*
|
||||||
|
* @type {<Mongoose.Schema>}
|
||||||
|
*/
|
||||||
|
var bruteForceSchema = modb.Schema({
|
||||||
|
_id: { type: String, index: 1 },
|
||||||
|
data: {
|
||||||
|
count: Number,
|
||||||
|
lastRequest: Date,
|
||||||
|
firstRequest: Date
|
||||||
|
},
|
||||||
|
expires: { type: Date, index: { expires: '1d' } }
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = modb.model('Bruteforce', bruteForceSchema);
|
Loading…
Reference in new issue