0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/apps/comments-ui/src/actions.js

13 lines
316 B
JavaScript
Raw Normal View History

const Actions = {
// Put your actions here
};
/** Handle actions in the App, returns updated state */
export default async function ActionHandler({action, data, state, api}) {
const handler = Actions[action];
if (handler) {
return await handler({data, state, api}) || {};
}
return {};
}