Changed stash routing.

This commit is contained in:
DebaucheryLibrarian
2023-06-08 04:19:37 +02:00
parent 81f504f33e
commit d847c58d24
9 changed files with 64 additions and 21 deletions

View File

@@ -10,14 +10,16 @@ import { curateStash } from '../curate';
function initStashesActions(store, _router) {
async function fetchStash(context, {
stashId,
stashSlug,
username,
section = 'scenes',
pageNumber = 1,
limit = 20,
}) {
const { stash } = await graphql(`
const { stashes: [stash] } = await graphql(`
query Stash(
$stashId: Int!
$stashSlug: String!
$username: String!
$includeScenes: Boolean!
$includeActors: Boolean!
$includeMovies: Boolean!
@@ -26,7 +28,12 @@ function initStashesActions(store, _router) {
$hasAuth: Boolean!
$userId: Int
) {
stash(id: $stashId) {
stashes(
filter: {
user: { username: { equalTo: $username } }
slug: { equalTo: $stashSlug }
}
) {
id
name
slug
@@ -101,7 +108,8 @@ function initStashesActions(store, _router) {
}
}
`, {
stashId: Number(stashId),
stashSlug,
username,
includeScenes: section === 'scenes',
includeActors: section === 'actors',
includeMovies: section === 'movies',