Added various tag photos and descriptions.

This commit is contained in:
DebaucheryLibrarian
2021-03-17 05:11:17 +01:00
parent 4e81a8a1d6
commit 5a2e93e900
48 changed files with 167 additions and 31 deletions

View File

@@ -138,7 +138,11 @@ function initReleasesActions(store, router) {
// const release = await get(`/releases/${releaseId}`);
const { movie } = await graphql(`
query Movie($movieId: Int!) {
query Movie(
$movieId: Int!
$hasAuth: Boolean!
$userId: Int
) {
movie(id: $movieId) {
id
title
@@ -232,10 +236,27 @@ function initReleasesActions(store, router) {
hasLogo
}
}
stashes: stashesMovies(
filter: {
stash: {
userId: {
equalTo: $userId
}
}
}
) @include(if: $hasAuth) {
stash {
id
name
slug
}
}
}
}
`, {
movieId: Number(movieId),
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,
});
if (!movie) {

View File

@@ -17,11 +17,21 @@ function initStashesActions(_store, _router) {
await del(`/stashes/${stashId}/scenes/${sceneId}`);
}
async function stashMovie(context, { movieId, stashId }) {
await post(`/stashes/${stashId}/movies`, { movieId });
}
async function unstashMovie(context, { movieId, stashId }) {
await del(`/stashes/${stashId}/movies/${movieId}`);
}
return {
stashActor,
stashScene,
stashMovie,
unstashActor,
unstashScene,
unstashMovie,
};
}