actions.js
4 years ago
controls.js
5 years ago
index.js
5 years ago
reducer.js
2 years ago
resolvers.js
4 years ago
selectors.js
4 years ago
resolvers.js
18 lines
| 1 | import * as actions from "./actions"; |
| 2 | |
| 3 | export default { |
| 4 | *getPresets() { |
| 5 | const presets = yield actions.fetchFromAPI("preset"); |
| 6 | return actions.setPresets(presets); |
| 7 | }, |
| 8 | *getAudioPresets(){ |
| 9 | const presets = yield actions.fetchFromAPI("audio-preset"); |
| 10 | return actions.setAudioPresets(presets); |
| 11 | }, |
| 12 | *getReusableVideo(id) { |
| 13 | const path = `presto-videos/${id}`; |
| 14 | const preset = yield actions.fetchFromWPAPI(path, {}); |
| 15 | return actions.addVideo(preset?.data || {}); |
| 16 | }, |
| 17 | }; |
| 18 |