Skip to content

Commit

Permalink
pokemontrades#665 Checkmarks
Browse files Browse the repository at this point in the history
Changes approval behavior (does not auto check for both anymore). Post is verified IF both users are logged and user's trade is approved.
  • Loading branch information
PBnJeli committed May 12, 2021
1 parent 75dd3d6 commit 9c08904
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/services/References.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ exports.approve = function (ref, approve) {
}).then(otherRef => {
var refsToSave = [ref];
if (otherRef) {
otherRef.approved = approve;
otherRef.verified = approve;
//otherRef.approved = approve;
otherRef.verified = true;
refsToSave.push(otherRef);
ref.verified = approve;
ref.verified = true;
}
return Promise.all(refsToSave.map(el => el.save())).then(refs => refs[0]);
});
Expand Down
2 changes: 1 addition & 1 deletion assets/views/home/row.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<span ng-if="user.isFlairMod && !onIndexPage && reference.edited" && isApprovable(reference)>
<font class="editstar" title="This reference was edited at some point.">*</font>
</span>
<span ng-if="user.isFlairMod && !onIndexPage && reference.verified && isApprovable(reference)">
<span ng-if="user.isFlairMod && !onIndexPage && reference.verified && reference.approved && isApprovable(reference)">
<sup><font class="greencheck" title="This trade has been approved and logged by both users.">✓</font></sup>
</span>
</td>
Expand Down

0 comments on commit 9c08904

Please sign in to comment.