chore: Introduce has many steps through flows for user model

This commit is contained in:
Faruk AYDIN
2022-01-29 19:48:59 +03:00
committed by Ömer Faruk Aydın
parent 700d0bfd32
commit 3429784309
5 changed files with 32 additions and 24 deletions

View File

@@ -10,8 +10,8 @@ const deleteStepResolver = async (
params: Params,
req: RequestWithCurrentUser
) => {
// TODO: This logic should be revised by using current user
await Step.query()
await req.currentUser
.$relatedQuery('steps')
.delete()
.findOne({
id: params.id,