aboutsummaryrefslogtreecommitdiff
path: root/src/site/store/images.js
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-23 04:08:31 +0300
committerZephyrrus <[email protected]>2020-07-23 04:08:31 +0300
commit39e9941ded8de4e41048781daa80de0838c01c19 (patch)
tree13893d6bfbd34f59076278561bfd1de50e9dd018 /src/site/store/images.js
parentfeat: add new search input (diff)
downloadhost.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.js6
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 = {