mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
357 B
19 lines
357 B
8 years ago
|
'use strict'
|
||
8 years ago
|
|
||
|
/**
|
||
|
* BruteForce schema
|
||
|
*
|
||
|
* @type {<Mongoose.Schema>}
|
||
|
*/
|
||
8 years ago
|
var bruteForceSchema = Mongoose.Schema({
|
||
8 years ago
|
_id: { type: String, index: 1 },
|
||
|
data: {
|
||
|
count: Number,
|
||
|
lastRequest: Date,
|
||
|
firstRequest: Date
|
||
|
},
|
||
|
expires: { type: Date, index: { expires: '1d' } }
|
||
|
})
|
||
8 years ago
|
|
||
8 years ago
|
module.exports = Mongoose.model('Bruteforce', bruteForceSchema)
|