Skip to content

Commit

Permalink
addresses lints from git merge
Browse files Browse the repository at this point in the history
  • Loading branch information
KesterTan committed Sep 25, 2024
1 parent 2a447be commit 8fde2f4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/src/client/topic/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define('forum/topic/events', [

'posts.verify': toggleVerifyMessage,
'posts.unverify': toggleVerifyMessage,

'posts.answer': toggleAnswered,
'posts.unanswer': toggleAnswered,

Expand Down
2 changes: 2 additions & 0 deletions src/controllers/write/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ Posts.verify = async (req, res) => {
Posts.unverify = async (req, res) => {
const data = await mock(req);
await api.posts.unverify(req, data);
helpers.formatApiResponse(200, res);
};

Posts.answer = async (req, res) => {
const data = await mock(req);
Expand Down
2 changes: 1 addition & 1 deletion src/posts/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const intFields = [
'uid', 'pid', 'tid', 'deleted', 'timestamp',
'upvotes', 'downvotes', 'deleterUid', 'edited',
'replies', 'bookmarks', 'verify', 'verifyUid',
'answered', 'answererUid',
'answered', 'answererUid',
];

module.exports = function (Posts) {
Expand Down
8 changes: 4 additions & 4 deletions test/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ describe('Post\'s', () => {
assert.equal(hasBookmarked[0], false);
});
});
describe('verifying', async () => {

describe('verifying', async () => {
it('should mark post verified', async () => {
await apiPosts.verify({ uid: voterUid }, { pid: postData.pid, room_id: `topic_${postData.tid}` });
const isVerified = await posts.getPostField(postData.pid, 'verify');
assert.strictEqual(isVerified, 1);
});
assert.strictEqual(isVerified, 1);
});
});

describe('answering', async () => {
Expand Down

0 comments on commit 8fde2f4

Please sign in to comment.