traxxx/assets/js/stashes/actions.js

19 lines
407 B
JavaScript
Raw Normal View History

2021-03-15 02:30:47 +00:00
import { post, del } from '../api';
function initStashesActions(_store, _router) {
2021-03-15 02:30:47 +00:00
async function stashActor(context, { actorId, stashId }) {
await post(`/stashes/${stashId}/actors`, { actorId });
}
2021-03-15 02:30:47 +00:00
async function unstashActor(context, { actorId, stashId }) {
await del(`/stashes/${stashId}/actors/${actorId}`);
}
return {
2021-03-15 02:30:47 +00:00
stashActor,
unstashActor,
};
}
export default initStashesActions;