mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
reduced Admin messages
This commit is contained in:
@@ -110,7 +110,7 @@ exports.deleteGroup = async function (req, res, next) {
|
||||
|
||||
|
||||
exports.reorderGroups = function (req, res, next) {
|
||||
console.log(req.body)
|
||||
|
||||
//router.post('/system/:shortName/group_order', isLoggedIn, function(req, res) {
|
||||
process.nextTick(async function () {
|
||||
const system = await System.findOne({ shortName: req.params.shortName.toLowerCase() });
|
||||
@@ -131,7 +131,7 @@ exports.reorderGroups = function (req, res, next) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log(req.body)
|
||||
|
||||
if (!req.body.groupOrder) {
|
||||
res.status(500);
|
||||
res.json({
|
||||
@@ -142,8 +142,6 @@ exports.reorderGroups = function (req, res, next) {
|
||||
}
|
||||
var groupOrder = JSON.parse(req.body.groupOrder);
|
||||
for (var i = 0; i < groupOrder.length; i++) {
|
||||
|
||||
console.log("in group: " + groupOrder[i] + " position: " + i);
|
||||
const group = await Group.findOneAndUpdate(
|
||||
{
|
||||
_id: new mongoose.Types.ObjectId(groupOrder[i]),
|
||||
@@ -177,10 +175,8 @@ exports.reorderGroups = function (req, res, next) {
|
||||
};
|
||||
|
||||
exports.upsertGroup = function (req, res, next) {
|
||||
console.log(req.body)
|
||||
//router.post('/system/:shortName/group/:groupId?', isLoggedIn, function(req, res) {
|
||||
process.nextTick(async function () {
|
||||
console.log(req.body)
|
||||
let system = await System.findOne({ shortName: req.params.shortName.toLowerCase() });
|
||||
|
||||
if (!system) {
|
||||
|
||||
@@ -58,7 +58,6 @@ exports.listUserSystems = async function (req,res,next) {
|
||||
}
|
||||
const users = await User.find({}, "_id email firstName lastName lastLogin");
|
||||
let list = [];
|
||||
console.log(users);
|
||||
for (let index = 0; index < users.length; index++) {
|
||||
let user = users[index].toObject();
|
||||
const userId = new mongoose.Types.ObjectId(user._id);
|
||||
|
||||
@@ -94,7 +94,6 @@ async function csv_import(shortName, filename, callback) {
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var row = data[i];
|
||||
console.log(row)
|
||||
if (!( "Decimal" in row) || !("Description" in row) || !("Alpha Tag" in row)) {
|
||||
console.error("Error: csv import column header error");
|
||||
callback("Column Headers are required - Required Columns: 'Decimal' 'Decscription' 'Alpha Tag' Optional Column: 'Priority' ", null);
|
||||
|
||||
Reference in New Issue
Block a user