Integration to Requarks Core

This commit is contained in:
NGPixel
2016-11-20 20:09:50 -05:00
parent 6744190859
commit 985761556c
52 changed files with 1129 additions and 1048 deletions

View File

@@ -1,13 +1,11 @@
"use strict";
const modb = require('mongoose');
/**
* BruteForce schema
*
* @type {<Mongoose.Schema>}
*/
var bruteForceSchema = modb.Schema({
var bruteForceSchema = Mongoose.Schema({
_id: { type: String, index: 1 },
data: {
count: Number,
@@ -17,4 +15,4 @@ var bruteForceSchema = modb.Schema({
expires: { type: Date, index: { expires: '1d' } }
});
module.exports = modb.model('Bruteforce', bruteForceSchema);
module.exports = Mongoose.model('Bruteforce', bruteForceSchema);

View File

@@ -1,7 +1,6 @@
"use strict";
const modb = require('mongoose'),
Promise = require('bluebird'),
const Promise = require('bluebird'),
_ = require('lodash');
/**
@@ -9,7 +8,7 @@ const modb = require('mongoose'),
*
* @type {<Mongoose.Schema>}
*/
var entrySchema = modb.Schema({
var entrySchema = Mongoose.Schema({
_id: String,
@@ -51,4 +50,4 @@ entrySchema.index({
name: 'EntriesTextIndex'
});
module.exports = modb.model('Entry', entrySchema);
module.exports = Mongoose.model('Entry', entrySchema);

View File

@@ -1,7 +1,6 @@
"use strict";
const modb = require('mongoose'),
Promise = require('bluebird'),
const Promise = require('bluebird'),
_ = require('lodash');
/**
@@ -9,7 +8,7 @@ const modb = require('mongoose'),
*
* @type {<Mongoose.Schema>}
*/
var uplFileSchema = modb.Schema({
var uplFileSchema = Mongoose.Schema({
_id: String,
@@ -48,4 +47,4 @@ var uplFileSchema = modb.Schema({
timestamps: {}
});
module.exports = modb.model('UplFile', uplFileSchema);
module.exports = Mongoose.model('UplFile', uplFileSchema);

View File

@@ -1,7 +1,6 @@
"use strict";
const modb = require('mongoose'),
Promise = require('bluebird'),
const Promise = require('bluebird'),
_ = require('lodash');
/**
@@ -9,7 +8,7 @@ const modb = require('mongoose'),
*
* @type {<Mongoose.Schema>}
*/
var uplFolderSchema = modb.Schema({
var uplFolderSchema = Mongoose.Schema({
_id: String,
@@ -23,4 +22,4 @@ var uplFolderSchema = modb.Schema({
timestamps: {}
});
module.exports = modb.model('UplFolder', uplFolderSchema);
module.exports = Mongoose.model('UplFolder', uplFolderSchema);

View File

@@ -1,7 +1,6 @@
"use strict";
const modb = require('mongoose'),
Promise = require('bluebird'),
const Promise = require('bluebird'),
bcrypt = require('bcryptjs-then'),
_ = require('lodash');
@@ -10,7 +9,7 @@ const modb = require('mongoose'),
*
* @type {<Mongoose.Schema>}
*/
var userSchema = modb.Schema({
var userSchema = Mongoose.Schema({
email: {
type: String,
@@ -86,4 +85,4 @@ userSchema.methods.validatePassword = function(rawPwd) {
});
};
module.exports = modb.model('User', userSchema);
module.exports = Mongoose.model('User', userSchema);