first commit
This commit is contained in:
20
lib/components/wakewords/proxy.js
Normal file
20
lib/components/wakewords/proxy.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict'
|
||||
|
||||
const {receivedWakewords} = require('./actions')
|
||||
|
||||
module.exports = {
|
||||
// urls that should be called for the remote actions
|
||||
urls: {
|
||||
fetch: 'https://layla.amazon.de/api/wake-word',
|
||||
},
|
||||
// called after an remote http call to the user data API has been successfully executed
|
||||
postHooks: {
|
||||
// called after the user data has been fetched
|
||||
fetch: (store, data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
store.dispatch(receivedWakewords(data.wakeWords))
|
||||
resolve(data)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user