Skip to content

Commit

Permalink
hotfix: return target's follow count
Browse files Browse the repository at this point in the history
  • Loading branch information
BoogieMonster1O1 committed Jun 21, 2024
1 parent 5b9944b commit c92db7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/App/GraphQL/Mutation/Resolver+MutateUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extension Resolver {

try await user.$following.attach(target, on: request.db)

return try await user.$following.query(on: request.db).count()
return try await target.$following.query(on: request.db).count()
}

func unfollowUser(request: Request, arguments: IntIdArgs) async throws -> Int {
Expand All @@ -57,6 +57,6 @@ extension Resolver {

try await user.$following.detach(target, on: request.db)

return try await user.$following.query(on: request.db).count()
return try await target.$following.query(on: request.db).count()
}
}

0 comments on commit c92db7f

Please sign in to comment.