Remove duplicate code (IOS-5)

Stuff gets already updated in the other methods
This commit is contained in:
Nathan Mattes 2023-12-18 20:38:20 +01:00
parent 7a67b595a3
commit 7efe949c8e
1 changed files with 0 additions and 22 deletions

View File

@ -88,28 +88,6 @@ extension APIService {
response = try await blockDomain(user: _user, authorizationBox: authenticationBox).singleOutput()
}
guard let relationship = try await self.relationship(records: [user], authenticationBox: authenticationBox).value.first else {
throw APIError.implicit(.badRequest)
}
try await managedObjectContext.performChanges {
let authentication = authenticationBox.authentication
guard
let user = user.object(in: managedObjectContext),
let me = authentication.user(in: managedObjectContext)
else { return }
Persistence.MastodonUser.update(
mastodonUser: user,
context: Persistence.MastodonUser.RelationshipContext(
entity: relationship,
me: me,
networkDate: response.networkDate
)
)
}
return response
}