diff options
| author | Zephyrrus <[email protected]> | 2020-07-23 04:08:31 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-07-23 04:08:31 +0300 |
| commit | 39e9941ded8de4e41048781daa80de0838c01c19 (patch) | |
| tree | 13893d6bfbd34f59076278561bfd1de50e9dd018 /src/site/store/images.js | |
| parent | feat: add new search input (diff) | |
| download | host.fuwn.me-39e9941ded8de4e41048781daa80de0838c01c19.tar.xz host.fuwn.me-39e9941ded8de4e41048781daa80de0838c01c19.zip | |
feat: Add hiding to recommendations as a prop
fix: change some of the regexes to remove , and ; as separator support because the query parser doesn't understad them and I don't feel like dealing with all the edge cases introduces by it
Diffstat (limited to 'src/site/store/images.js')
| -rw-r--r-- | src/site/store/images.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/site/store/images.js b/src/site/store/images.js index 4737c26..0488573 100644 --- a/src/site/store/images.js +++ b/src/site/store/images.js @@ -108,6 +108,12 @@ export const actions = { return response; }, + async search({ commit }, { q, albumId }) { + const optionalAlbum = albumId ? `&albumId=${albumId}` : ''; + const response = await this.$axios.$get(`search/?q=${encodeURI(q)}${optionalAlbum}`); + + return response; + }, }; export const mutations = { |