Skip to content

Commit

Permalink
chore(lint): fix lint issue in article resolve (#154)
Browse files Browse the repository at this point in the history
* chore(lint): fix lint issue in article resolve

* chore(lint): const to function
  • Loading branch information
120EE0692 authored Oct 20, 2022
1 parent 4b82c75 commit cf1a78a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/schema/article/article.resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ module.exports = {
onlyPublished =
onlyPublished || !UserPermission.exists(session, authToken, decodedToken, 'article.list.unpublished');

const startAndEndDate = (year, month) => {
function startAndEndDate(year, month) {
return month ? [new Date(year, month - 1), new Date(year, month)] : [new Date(year, 0), new Date(year + 1, 0)];
};
}
const _articles = await Article.findByYearAndMonth(
allowRestricted,
onlyPublished,
Expand Down

0 comments on commit cf1a78a

Please sign in to comment.