forked from DebaucheryLibrarian/traxxx
Refactored http timeout handling.
This commit is contained in:
@@ -346,6 +346,21 @@ const releaseFragment = `
|
||||
}
|
||||
}
|
||||
}
|
||||
stashes: stashesScenesBySceneId(
|
||||
filter: {
|
||||
stash: {
|
||||
userId: {
|
||||
equalTo: $userId
|
||||
}
|
||||
}
|
||||
}
|
||||
) @include(if: $hasAuth) {
|
||||
stash {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -37,11 +37,17 @@ function initReleasesActions(store, router) {
|
||||
// const release = await get(`/releases/${releaseId}`);
|
||||
|
||||
const { release } = await graphql(`
|
||||
query Release($releaseId:Int!) {
|
||||
query Release(
|
||||
$releaseId: Int!
|
||||
$hasAuth: Boolean!
|
||||
$userId: Int
|
||||
) {
|
||||
${releaseFragment}
|
||||
}
|
||||
`, {
|
||||
releaseId: Number(releaseId),
|
||||
hasAuth: !!store.state.auth.user,
|
||||
userId: store.state.auth.user?.id,
|
||||
});
|
||||
|
||||
if (!release) {
|
||||
|
||||
@@ -9,9 +9,19 @@ function initStashesActions(_store, _router) {
|
||||
await del(`/stashes/${stashId}/actors/${actorId}`);
|
||||
}
|
||||
|
||||
async function stashScene(context, { sceneId, stashId }) {
|
||||
await post(`/stashes/${stashId}/scenes`, { sceneId });
|
||||
}
|
||||
|
||||
async function unstashScene(context, { sceneId, stashId }) {
|
||||
await del(`/stashes/${stashId}/scenes/${sceneId}`);
|
||||
}
|
||||
|
||||
return {
|
||||
stashActor,
|
||||
stashScene,
|
||||
unstashActor,
|
||||
unstashScene,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { graphql } from '../api';
|
||||
import { releaseFields } from '../fragments';
|
||||
import { curateUser } from '../curate';
|
||||
|
||||
function initUsersActions(_store, _router) {
|
||||
async function fetchUser(context, username) {
|
||||
@@ -43,45 +45,7 @@ function initUsersActions(_store, _router) {
|
||||
scenes: stashesScenes {
|
||||
comment
|
||||
scene {
|
||||
id
|
||||
title
|
||||
slug
|
||||
url
|
||||
date
|
||||
actors: releasesActors {
|
||||
actor {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
tags: releasesTags {
|
||||
tag {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
entity {
|
||||
id
|
||||
name
|
||||
slug
|
||||
independent
|
||||
parent {
|
||||
id
|
||||
name
|
||||
slug
|
||||
independent
|
||||
}
|
||||
}
|
||||
poster: releasesPosterByReleaseId {
|
||||
media {
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
}
|
||||
}
|
||||
${releaseFields}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,7 +55,7 @@ function initUsersActions(_store, _router) {
|
||||
username,
|
||||
});
|
||||
|
||||
return user;
|
||||
return curateUser(user);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user