Added public visibility toggle to user page stashes.

This commit is contained in:
DebaucheryLibrarian
2021-03-20 02:03:30 +01:00
parent 011f10fba8
commit 4bc6ff846d
11 changed files with 240 additions and 24 deletions

View File

@@ -1,4 +1,10 @@
import { graphql, post, del } from '../api';
import {
graphql,
post,
del,
patch,
} from '../api';
import { releaseFields } from '../fragments';
import { curateStash } from '../curate';
@@ -61,6 +67,12 @@ function initStashesActions(store, _router) {
return curateStash(stash);
}
async function updateStash(context, { stashId, stash }) {
const newStash = await patch(`/stashes/${stashId}`, stash);
return newStash;
}
async function stashActor(context, { actorId, stashId }) {
await post(`/stashes/${stashId}/actors`, { actorId });
}
@@ -93,6 +105,7 @@ function initStashesActions(store, _router) {
unstashActor,
unstashScene,
unstashMovie,
updateStash,
};
}