fix event import from URL
This commit is contained in:
parent
e1bca6f46a
commit
f7357666ca
1 changed files with 3 additions and 3 deletions
|
@ -197,9 +197,9 @@ module.exports = {
|
|||
* It does supports ICS and H-EVENT
|
||||
*/
|
||||
async importURL(req, res) {
|
||||
const URL = req.query.URL
|
||||
const url = req.query.URL
|
||||
try {
|
||||
const response = await axios.get(URL)
|
||||
const response = await axios.get(url)
|
||||
const contentType = response.headers['content-type']
|
||||
|
||||
if (contentType.includes('text/html')) {
|
||||
|
@ -211,7 +211,7 @@ module.exports = {
|
|||
const props = e.properties
|
||||
let media = get(props, 'featured[0]')
|
||||
if (media) {
|
||||
media = url.resolve(URL, media)
|
||||
media = URL.resolve(url, media)
|
||||
}
|
||||
return {
|
||||
title: get(props, 'name[0]', ''),
|
||||
|
|
Loading…
Reference in a new issue