autofix URL on import
This commit is contained in:
parent
91f482df9e
commit
00e8e0bd37
1 changed files with 3 additions and 1 deletions
|
@ -79,6 +79,9 @@ export default {
|
|||
this.error = true
|
||||
return
|
||||
}
|
||||
if (!this.URL.match(/^https?:\/\//)) {
|
||||
this.URL = `https://${this.URL}`
|
||||
}
|
||||
this.error = false
|
||||
this.errorMessage = ''
|
||||
this.loading = true
|
||||
|
@ -86,7 +89,6 @@ export default {
|
|||
try {
|
||||
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
|
||||
this.events = ret
|
||||
|
||||
// check if contain an h-event
|
||||
this.$emit('imported', ret[0])
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue