Skip to content

Commit

Permalink
fix loading status update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas committed Sep 24, 2024
1 parent 1fd0b6d commit 7151296
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,26 @@ export class EpisodeEntitiesFormComponent implements OnChanges, OnDestroy {
}

addEntity(entityID: string, episodeID: string): void {
this.status$.next('loading');
const input: CreateEpisodeEntityLinkInput = {
entity: entityID,
episode: episodeID,
entityType: this.entityType,
};
this.addMutation.mutate({ input }, {
refetchQueries: REFETCH_QUERIES,
}).pipe(
tap(() => this.status$.next('loading'))
).subscribe(this.mutationRequestObserver);
}).subscribe(this.mutationRequestObserver);
}

removeEntity(entityID: string, episodeID: string): void {
this.status$.next('loading');
const data: DataEntryDeleteEpisodeEntityLinkMutationVariables = {
entity: entityID,
episode: episodeID,
entityType: this.entityType,
};
this.removeMutation.mutate(data, { refetchQueries: REFETCH_QUERIES }).pipe(
tap(() => this.status$.next('loading'))
this.removeMutation.mutate(
data, { refetchQueries: REFETCH_QUERIES }
).subscribe(this.mutationRequestObserver)
}

Expand Down

0 comments on commit 7151296

Please sign in to comment.