Browse Source

Fixed issue with resolving reports

theflametrooper 8 years ago
parent
commit
e76c02e22b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      backend/logic/actions/reports.js

+ 5 - 1
backend/logic/actions/reports.js

@@ -98,7 +98,11 @@ module.exports = {
 
 			(report, next) => {
 				if (!report) return next('Report not found.');
-				report.update({ _id: reportId }, next);
+				report.resolved = true;
+				report.save(err => {
+					if (err) next(err.message);
+					else next();
+				});
 			}
 		], (err) => {
 			if (err) {