autofix URL on import
This commit is contained in:
@@ -79,6 +79,9 @@ export default {
|
|||||||
this.error = true
|
this.error = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.URL.match(/^https?:\/\//)) {
|
||||||
|
this.URL = `https://${this.URL}`
|
||||||
|
}
|
||||||
this.error = false
|
this.error = false
|
||||||
this.errorMessage = ''
|
this.errorMessage = ''
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -86,7 +89,6 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
|
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
|
||||||
this.events = ret
|
this.events = ret
|
||||||
|
|
||||||
// check if contain an h-event
|
// check if contain an h-event
|
||||||
this.$emit('imported', ret[0])
|
this.$emit('imported', ret[0])
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user