Skip to content

Commit

Permalink
removed extra console logs from collections/bundles controller
Browse files Browse the repository at this point in the history
  • Loading branch information
vsun757 committed Feb 13, 2024
1 parent cb909c2 commit 53ad22c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions app/controllers/collection-bundles-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ exports.importBundle = function(req, res) {
return res.status(400).send(errorResult);
}
else {
console.log("import error");
console.log(err);
logger.error("Unable to import collection, create collection index failed with error: " + err);
return res.status(500).send("Unable to import collection, unable to create collection index. Server error.");
}
Expand Down Expand Up @@ -161,8 +159,6 @@ exports.exportBundle = async function(req, res) {
return res.status(404).send('Collection not found');
}
else {
console.log("export error");
console.log(err);
logger.error('Unable to export collection: ' + err);
return res.status(500).send('Unable to export collection.');
}
Expand Down
12 changes: 0 additions & 12 deletions app/controllers/collections-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ exports.retrieveAll = function(req, res) {

collectionsService.retrieveAll(options, function(err, collections) {
if (err) {
console.log("retrieveall error");
console.log(err);
logger.error('Failed with error: ' + err);
return res.status(500).send('Unable to get collections. Server error.');
}
Expand Down Expand Up @@ -46,8 +44,6 @@ exports.retrieveById = function(req, res) {
return res.status(400).send('Query string parameter versions is invalid.');
}
else {
console.log("retrievebyid error");
console.log(err);
logger.error('Failed with error: ' + err);
return res.status(500).send('Unable to get collections. Server error.');
}
Expand Down Expand Up @@ -75,8 +71,6 @@ exports.retrieveVersionById = function(req, res) {
return res.status(400).send('Stix id is badly formatted.');
}
else {
console.log("retrieveversionbyid error");
console.log(err);
logger.error('Failed with error: ' + err);
return res.status(500).send('Unable to get collections. Server error.');
}
Expand Down Expand Up @@ -117,8 +111,6 @@ exports.create = async function(req, res) {
return res.status(409).send('Unable to create collection. Duplicate stix.id and stix.modified properties.');
}
else {
console.log("create error");
console.log(err);
logger.error("Failed with error: " + err);
return res.status(500).send("Unable to create collection. Server error.");
}
Expand All @@ -135,8 +127,6 @@ exports.delete = async function(req, res) {
return res.status(204).end();
}
} catch (error) {
console.log("delete error");
console.log(error);
logger.error('Delete collections failed. ' + error);
return res.status(500).send('Unable to delete collections. Server error.');
}
Expand All @@ -153,8 +143,6 @@ exports.deleteVersionById = async function(req, res) {
return res.status(204).end();
}
} catch (error) {
console.log("deleteversionbyid error");
console.log(error);
logger.error('Delete collection failed. ' + error);
return res.status(500).send('Unable to delete collection. Server error.');
}
Expand Down

0 comments on commit 53ad22c

Please sign in to comment.