Added favorite stash heart to scene tiles.

This commit is contained in:
DebaucheryLibrarian
2021-03-19 03:27:48 +01:00
parent f3d55806d1
commit 731a2792c5
15 changed files with 146 additions and 28 deletions

View File

@@ -2,11 +2,13 @@ import { graphql, post, del } from '../api';
import { releaseFields } from '../fragments';
import { curateStash } from '../curate';
function initStashesActions(_store, _router) {
function initStashesActions(store, _router) {
async function fetchStash(context, stashId) {
const { stash } = await graphql(`
query Stash(
$stashId: Int!
$hasAuth: Boolean!
$userId: Int
) {
stash(id: $stashId) {
id
@@ -52,6 +54,8 @@ function initStashesActions(_store, _router) {
}
`, {
stashId: Number(stashId),
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,
});
return curateStash(stash);