orderiom-api-package 0.2.35 → 0.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -286,26 +286,31 @@ const actions = {
|
|
|
286
286
|
commit('setBlogs', res.data.data)
|
|
287
287
|
return {
|
|
288
288
|
type: 'success',
|
|
289
|
-
msg: ''
|
|
289
|
+
msg: '',
|
|
290
|
+
tagName: res.data.meta.searched_tag.name
|
|
290
291
|
}
|
|
291
292
|
}).catch(error => {
|
|
292
293
|
commit('setBlogs', [])
|
|
293
294
|
if(!error.response){
|
|
294
295
|
return {
|
|
295
296
|
type: 'error',
|
|
296
|
-
msg: 'Could not fetch blogs'
|
|
297
|
+
msg: 'Could not fetch blogs',
|
|
298
|
+
tagName: ''
|
|
297
299
|
}
|
|
298
300
|
}
|
|
299
301
|
const status = error.response.status;
|
|
300
302
|
if (status === 422) {
|
|
301
303
|
return {
|
|
302
304
|
type: 'error',
|
|
303
|
-
msg: Object.values(error.response.data.error.validation).map(m => { return m[0] }).toString()
|
|
305
|
+
msg: Object.values(error.response.data.error.validation).map(m => { return m[0] }).toString(),
|
|
306
|
+
tagName: ''
|
|
304
307
|
}
|
|
305
308
|
}
|
|
306
309
|
if ([401, 403, 404, 400].includes(status)) {
|
|
307
310
|
return {
|
|
308
|
-
type: 'error',
|
|
311
|
+
type: 'error',
|
|
312
|
+
msg: error.response.data.message.body,
|
|
313
|
+
tagName: ''
|
|
309
314
|
}
|
|
310
315
|
}
|
|
311
316
|
}).finally(() => {
|