Files
alexis/lib/components/timeline/proxy.js
2023-08-01 12:47:58 +02:00

19 lines
448 B
JavaScript

'use strict'
const {receivedTimeline} = require('./actions')
module.exports = {
// urls that should be called for the remote actions
urls: {
fetch: 'https://layla.amazon.de/api/cards?limit=50',
},
postHooks: {
// called after the timeline has been fetched
fetch: (store, data) => {
return new Promise((resolve, reject) => {
store.dispatch(receivedTimeline(data.cards))
resolve(data)
})
},
}
}