[frontend] Add Follow and Unfollow to UserControllerModel

This commit is contained in:
Lilian 2024-07-10 19:19:37 +02:00
parent 954d42d355
commit 0dd79abca9
No known key found for this signature in database

View file

@ -24,4 +24,8 @@ internal class UserControllerModel(ApiClient api)
if (host != null) query = query.Add("host", host);
return api.CallNullable<UserResponse>(HttpMethod.Get, "/users/lookup", query);
}
public Task FollowUser(string id) => api.Call(HttpMethod.Post, $"/users/{id}/follow");
public Task UnfollowUser(string id) => api.Call(HttpMethod.Post, $"/users/{id}/unfollow");
}