Add auth for war routes; Add new collections in backup
parent
8c3d944561
commit
83f06e5914
|
@ -14,7 +14,7 @@ const logger = require('debug')('cc:squads');
|
|||
const codes = require('./http-codes');
|
||||
|
||||
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');
|
||||
|
||||
// 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 parts = body.date.split("-");
|
||||
body.date = new Date(parseInt(parts[0], 10),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 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[@]}"
|
||||
do
|
||||
|
|
Loading…
Reference in New Issue