summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2022-08-31 15:46:34 +0200
committerMarcel Klehr <mklehr@gmx.net>2022-09-01 13:41:33 +0200
commiteb2c11bcf68c0879fdef555e357d8e08ee281a02 (patch)
tree7e12de26e4b91a1f4eb84d7342b97438b5726126
parent140628a31ec8c9ea347fffe3bbb48cc14f1ec562 (diff)
Fix abort signal usage
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r--src/store/systemtags.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/store/systemtags.js b/src/store/systemtags.js
index c8bb30ea..94a2dfb7 100644
--- a/src/store/systemtags.js
+++ b/src/store/systemtags.js
@@ -22,7 +22,6 @@
import Vue from 'vue'
import { sortCompare } from '../utils/fileUtils'
import getTaggedImages from '../services/TaggedImages'
-import { abortController } from '../services/RequestHandler'
import getSystemTags from '../services/SystemTags'
const state = {
@@ -125,14 +124,15 @@ const actions = {
/**
*
* @param context
- * @param id.id
- * @param id the tag id to fetch files for
+ * @param obj
+ * @param obj.id the tag id to fetch files for
+ * @param obj.signal AbortController signal
* @return {Promise<void>}
*/
- async fetchTagFiles(context, { id }) {
+ async fetchTagFiles(context, { id, signal }) {
try {
// get data
- const files = await getTaggedImages(id, { signal: abortController.signal })
+ const files = await getTaggedImages(id, { signal })
await context.dispatch('updateTag', { id, files })
await context.dispatch('appendFiles', files)
} catch (error) {
@@ -142,9 +142,9 @@ const actions = {
}
},
- async fetchAllTags(context) {
+ async fetchAllTags(context, { signal }) {
const tags = await getSystemTags('', {
- signal: abortController.signal,
+ signal,
})
await context.dispatch('updateTags', tags)
},