Add auth for war routes; Add new collections in backup

pull/1/head
Florian Hartwich 2017-07-08 22:53:06 +02:00
parent 8c3d944561
commit 83f06e5914
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ const logger = require('debug')('cc:squads');
const codes = require('./http-codes'); const codes = require('./http-codes');
const apiAuthenticationMiddleware = require('../middleware/auth-middleware'); const apiAuthenticationMiddleware = require('../middleware/auth-middleware');
// const checkMT = require('../middleware/permission-check').checkMT(); const checkMT = require('../middleware/permission-check').checkMT;
const routerHandling = require('../middleware/router-handling'); const routerHandling = require('../middleware/router-handling');
// Mongoose Model using mongoDB // Mongoose Model using mongoDB
@ -42,7 +42,7 @@ wars.route('/')
}); });
}) })
.post(upload.single('log'), (req, res, next) => { .post(apiAuthenticationMiddleware, checkMT, upload.single('log'), (req, res, next) => {
let body = req.body; let body = req.body;
let parts = body.date.split("-"); let parts = body.date.split("-");
body.date = new Date(parseInt(parts[0], 10), body.date = new Date(parseInt(parts[0], 10),

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# array of available collection names # array of available collection names
col=(app_user awarding decoration rank squad user promotion) col=(app_user awarding decoration rank squad user promotion player war)
for i in "${col[@]}" for i in "${col[@]}"
do do