diff options
| author | Pitu <[email protected]> | 2020-12-24 23:45:16 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-12-24 23:45:16 +0900 |
| commit | fb2c27086f570fec60f4d52dcc9ca80e53186293 (patch) | |
| tree | 4c4fd056c293b8e0de632023ef19fdea95c009fa /src/api/utils/QueryHelper.js | |
| parent | Merge pull request #228 from Zephyrrus/begone_trailing_commas (diff) | |
| download | host.fuwn.me-fb2c27086f570fec60f4d52dcc9ca80e53186293.tar.xz host.fuwn.me-fb2c27086f570fec60f4d52dcc9ca80e53186293.zip | |
Fix ESLint rules once and for all
Diffstat (limited to 'src/api/utils/QueryHelper.js')
| -rw-r--r-- | src/api/utils/QueryHelper.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/api/utils/QueryHelper.js b/src/api/utils/QueryHelper.js index 7fabd06..c26c8eb 100644 --- a/src/api/utils/QueryHelper.js +++ b/src/api/utils/QueryHelper.js @@ -2,16 +2,16 @@ const chrono = require('chrono-node'); class QueryHelper { static parsers = { - before: (val) => QueryHelper.parseChronoList(val), - after: (val) => QueryHelper.parseChronoList(val), - tag: (val) => QueryHelper.sanitizeTags(val) + before: val => QueryHelper.parseChronoList(val), + after: val => QueryHelper.parseChronoList(val), + tag: val => QueryHelper.sanitizeTags(val) }; static requirementHandlers = { - album: (knex) => knex + album: knex => knex .join('albumsFiles', 'files.id', '=', 'albumsFiles.fileId') .join('albums', 'albumsFiles.albumId', '=', 'album.id'), - tag: (knex) => knex + tag: knex => knex .join('fileTags', 'files.id', '=', 'fileTags.fileId') .join('tags', 'fileTags.tagId', '=', 'tags.id') } @@ -93,11 +93,11 @@ class QueryHelper { } static parseChronoList(list) { - return list.map((e) => chrono.parse(e)); + return list.map(e => chrono.parse(e)); } static sanitizeTags(list) { - return list.map((e) => e.replace(/\s/g, '_')); + return list.map(e => e.replace(/\s/g, '_')); } static generateInclusionForTags(db, knex, list) { |