Added favorites button to actor page.
This commit is contained in:
@@ -24,6 +24,8 @@ function initActorActions(store, router) {
|
||||
const { actor } = await graphql(`
|
||||
query Actor(
|
||||
$actorId: Int!
|
||||
$userId: Int,
|
||||
$hasAuth: Boolean!,
|
||||
$limit:Int = 10,
|
||||
$offset:Int = 0,
|
||||
$after:Datetime = "1900-01-01",
|
||||
@@ -236,6 +238,21 @@ function initActorActions(store, router) {
|
||||
}
|
||||
totalCount
|
||||
}
|
||||
stashes: stashesActors(
|
||||
filter: {
|
||||
stash: {
|
||||
userId: {
|
||||
equalTo: $userId
|
||||
}
|
||||
}
|
||||
}
|
||||
) @include(if: $hasAuth) {
|
||||
stash {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`, {
|
||||
@@ -253,6 +270,8 @@ function initActorActions(store, router) {
|
||||
includedEntities: getIncludedEntities(router),
|
||||
includedActors: getIncludedActors(router),
|
||||
mode,
|
||||
hasAuth: !!store.state.auth.user,
|
||||
userId: store.state.auth.user?.id,
|
||||
});
|
||||
|
||||
if (!actor) {
|
||||
|
||||
Reference in New Issue
Block a user