mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
api refactoring
This commit is contained in:
@@ -213,6 +213,7 @@ export default {
|
||||
isExpiration: false,
|
||||
isEmailSharing: false,
|
||||
shareOptions: {
|
||||
id: undefined,
|
||||
isPassword: undefined,
|
||||
expiration: undefined,
|
||||
password: undefined,
|
||||
@@ -244,7 +245,7 @@ export default {
|
||||
|
||||
// Send request to get share link
|
||||
axios
|
||||
.post(`/api/share/${this.id}`, this.shareOptions)
|
||||
.post('/api/share', this.shareOptions)
|
||||
.then((response) => {
|
||||
// End loading
|
||||
this.isGeneratedShared = true
|
||||
@@ -278,18 +279,18 @@ export default {
|
||||
this.pickedItem = args.item
|
||||
|
||||
this.shareOptions.type = args.item.data.type
|
||||
this.id = args.item.data.id
|
||||
this.shareOptions.id = args.item.data.id
|
||||
})
|
||||
|
||||
// Close popup
|
||||
events.$on('popup:close', () => {
|
||||
// Restore data
|
||||
setTimeout(() => {
|
||||
this.id = undefined
|
||||
this.isGeneratedShared = false
|
||||
this.isExpiration = false
|
||||
this.isEmailSharing = false
|
||||
this.shareOptions = {
|
||||
id: undefined,
|
||||
isPassword: false,
|
||||
expiration: undefined,
|
||||
password: undefined,
|
||||
|
||||
Reference in New Issue
Block a user