mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-06-05 21:59:25 +02:00
parse events
This commit is contained in:
@ -41,7 +41,8 @@ export default ({ attributes, setAttributes }) => {
|
|||||||
}
|
}
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then((response) => response.text()) // TODO also handle response.ok being false
|
.then((response) => response.text()) // TODO also handle response.ok being false
|
||||||
.then((events) => {
|
.then((data) => {
|
||||||
|
const events = JSON.parse(data)
|
||||||
displayEvents({ events, document, container })
|
displayEvents({ events, document, container })
|
||||||
})
|
})
|
||||||
.catch((data) => {
|
.catch((data) => {
|
||||||
|
Reference in New Issue
Block a user