瀏覽代碼

Fixed issue with resolving reports

theflametrooper 8 年之前
父節點
當前提交
e76c02e22b
共有 1 個文件被更改,包括 5 次插入1 次删除
  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) {