소스 검색

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) {