Skip to content

Commit

Permalink
Merge pull request #31 from goelaine/newAccessorResolvedFunction
Browse files Browse the repository at this point in the history
wrote accessor function for resolved field
  • Loading branch information
luciafang authored Sep 30, 2024
2 parents 33244c8 + 0fa81aa commit 512ac12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/api/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,13 @@ topicsAPI.markUnresolved = async (caller, { tid }) => {
await topics.setTopicField(tid, 'resolved', false);
console.log('unresolved pressed!');
};

topicsAPI.isResolved = async (caller, { tid }) => {
const isResolved = await topics.getTopicFields(tid, ['resolved']);
if (strictEqual(isResolved.resolved, 'false')){

Check failure on line 314 in src/api/topics.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

'strictEqual' is not defined

Check failure on line 314 in src/api/topics.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Missing space before opening brace
return false;
}

Check failure on line 316 in src/api/topics.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Closing curly brace does not appear on the same line as the subsequent block
else{

Check failure on line 317 in src/api/topics.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Expected space(s) after "else"

Check failure on line 317 in src/api/topics.js

View workflow job for this annotation

GitHub Actions / lint-and-test / test

Unnecessary 'else' after 'return'
return true;
}
};

0 comments on commit 512ac12

Please sign in to comment.