1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-02-03 02:37:37 +01:00

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

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
}