diff --git a/pak/graphql/mutations/stash.py b/pak/graphql/mutations/stash.py index 8cafb6f..68b2944 100644 --- a/pak/graphql/mutations/stash.py +++ b/pak/graphql/mutations/stash.py @@ -37,11 +37,11 @@ def update_stash(info: Info, input: inputs.UpdateStashInput) -> types.Stash: return stash -def delete_stash(info: Info, input: inputs.DeleteStashInput) -> types.Stash: +def delete_stash(info: Info, input: inputs.DeleteStashInput) -> strawberry.ID: user = info.context.request.user - stash = models.Stash.objects.get(id=input.id, owner=user) + stash = models.Stash.objects.get(id=input.stash) stash.delete() return stash diff --git a/pak/inputs.py b/pak/inputs.py index f829106..0724176 100644 --- a/pak/inputs.py +++ b/pak/inputs.py @@ -7,7 +7,7 @@ class CreateStashInput: @strawberry.input class DeleteStashInput: - id: str + stash: strawberry.ID @strawberry.input class StashItemInput: