Added stash menu to release page, returning stashes from stash API to avoid reloading or local interpolation.
This commit is contained in:
@@ -21,7 +21,7 @@ function initStashesActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
public
|
||||
deletable
|
||||
primary
|
||||
user {
|
||||
id
|
||||
username
|
||||
@@ -69,15 +69,11 @@ function initStashesActions(store, _router) {
|
||||
}
|
||||
|
||||
async function createStash(context, stash) {
|
||||
const newStash = await post('/stashes', stash);
|
||||
|
||||
return newStash;
|
||||
return post('/stashes', stash);
|
||||
}
|
||||
|
||||
async function updateStash(context, { stashId, stash }) {
|
||||
const newStash = await patch(`/stashes/${stashId}`, stash);
|
||||
|
||||
return newStash;
|
||||
return patch(`/stashes/${stashId}`, stash);
|
||||
}
|
||||
|
||||
async function removeStash(context, stashId) {
|
||||
@@ -85,27 +81,27 @@ function initStashesActions(store, _router) {
|
||||
}
|
||||
|
||||
async function stashActor(context, { actorId, stashId }) {
|
||||
await post(`/stashes/${stashId}/actors`, { actorId });
|
||||
return post(`/stashes/${stashId}/actors`, { actorId });
|
||||
}
|
||||
|
||||
async function unstashActor(context, { actorId, stashId }) {
|
||||
await del(`/stashes/${stashId}/actors/${actorId}`);
|
||||
return del(`/stashes/${stashId}/actors/${actorId}`);
|
||||
}
|
||||
|
||||
async function stashScene(context, { sceneId, stashId }) {
|
||||
await post(`/stashes/${stashId}/scenes`, { sceneId });
|
||||
return post(`/stashes/${stashId}/scenes`, { sceneId });
|
||||
}
|
||||
|
||||
async function unstashScene(context, { sceneId, stashId }) {
|
||||
await del(`/stashes/${stashId}/scenes/${sceneId}`);
|
||||
return del(`/stashes/${stashId}/scenes/${sceneId}`);
|
||||
}
|
||||
|
||||
async function stashMovie(context, { movieId, stashId }) {
|
||||
await post(`/stashes/${stashId}/movies`, { movieId });
|
||||
return post(`/stashes/${stashId}/movies`, { movieId });
|
||||
}
|
||||
|
||||
async function unstashMovie(context, { movieId, stashId }) {
|
||||
await del(`/stashes/${stashId}/movies/${movieId}`);
|
||||
return del(`/stashes/${stashId}/movies/${movieId}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user