From 0dd79abca991c5b3fc881d3edbaf443418dd48c2 Mon Sep 17 00:00:00 2001 From: Lilian Date: Wed, 10 Jul 2024 19:19:37 +0200 Subject: [PATCH] [frontend] Add Follow and Unfollow to UserControllerModel --- .../Core/ControllerModels/UserControllerModel.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs b/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs index a2111c3f..95469c8f 100644 --- a/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs +++ b/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs @@ -24,4 +24,8 @@ internal class UserControllerModel(ApiClient api) if (host != null) query = query.Add("host", host); return api.CallNullable(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"); } \ No newline at end of file