Changed stash routing.
This commit is contained in:
@@ -233,7 +233,7 @@ const routes = [
|
||||
name: 'notifications',
|
||||
},
|
||||
{
|
||||
path: '/stash/:stashId/:stashSlug',
|
||||
path: '/user/:username/stash/:stashSlug',
|
||||
redirect: (from) => ({
|
||||
name: 'stash',
|
||||
params: {
|
||||
@@ -244,7 +244,7 @@ const routes = [
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: '/stash/:stashId/:stashSlug?/:range/:pageNumber',
|
||||
path: '/user/:username/stash/:stashSlug/:range/:pageNumber',
|
||||
component: Stash,
|
||||
name: 'stash',
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user