mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 11:15:58 +00:00
backend refactoring
This commit is contained in:
+4
-2
@@ -42,7 +42,9 @@ const actions = {
|
||||
context.commit('ADD_TO_FAVOURITES', folder)
|
||||
|
||||
axios
|
||||
.post(context.getters.api + '/add-to-favourites', {unique_id: folder.unique_id})
|
||||
.post(context.getters.api + '/folders/favourites', {
|
||||
unique_id: folder.unique_id
|
||||
})
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
@@ -57,7 +59,7 @@ const actions = {
|
||||
context.commit('REMOVE_ITEM_FROM_FAVOURITES', folder)
|
||||
|
||||
axios
|
||||
.post(context.getters.api + '/remove-from-favourites', {unique_id: folder.unique_id})
|
||||
.delete(context.getters.api + '/folders/favourites/' + folder.unique_id)
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
|
||||
Reference in New Issue
Block a user