Fetch calendar data from URL
This commit is contained in:
parent
f677014cb1
commit
1631ba3478
|
@ -52,7 +52,7 @@ app.post('/merge', async (req, res) => {
|
||||||
// Read calendar data from local file
|
// Read calendar data from local file
|
||||||
const data = fs.readFileSync(path.resolve(calendar.url), 'utf-8');
|
const data = fs.readFileSync(path.resolve(calendar.url), 'utf-8');
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
url: data,
|
data: data,
|
||||||
prefix: calendar.prefix,
|
prefix: calendar.prefix,
|
||||||
override: calendar.override,
|
override: calendar.override,
|
||||||
});
|
});
|
||||||
|
@ -62,6 +62,7 @@ app.post('/merge', async (req, res) => {
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Fetch calendar data from URL
|
||||||
return axios.get(calendar.url)
|
return axios.get(calendar.url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue