From e68ec89cdb171fd29333823604d9065e9a182046 Mon Sep 17 00:00:00 2001 From: pancakes Date: Mon, 21 Oct 2024 13:02:01 +1000 Subject: [PATCH] Fix formatting --- Iceshrimp.Backend/Controllers/Web/UserController.cs | 3 ++- .../Core/ControllerModels/UserControllerModel.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Iceshrimp.Backend/Controllers/Web/UserController.cs b/Iceshrimp.Backend/Controllers/Web/UserController.cs index 44e4d698..f07bf2f4 100644 --- a/Iceshrimp.Backend/Controllers/Web/UserController.cs +++ b/Iceshrimp.Backend/Controllers/Web/UserController.cs @@ -111,7 +111,8 @@ public class UserController( if (user.Id == id) throw GracefulException.BadRequest("You cannot bite yourself"); - var target = await db.Users.IncludeCommonProperties().Where(p => p.Id == id).FirstOrDefaultAsync() ?? throw GracefulException.NotFound("User not found"); + var target = await db.Users.IncludeCommonProperties().Where(p => p.Id == id).FirstOrDefaultAsync() ?? + throw GracefulException.NotFound("User not found"); await biteSvc.BiteAsync(user, target); } diff --git a/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs b/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs index eca28189..7a20ef81 100644 --- a/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs +++ b/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs @@ -24,7 +24,9 @@ internal class UserControllerModel(ApiClient api) return api.CallNullable(HttpMethod.Get, "/users/lookup", query); } - public Task BiteUser(string id) => api.Call(HttpMethod.Post, $"/users/{id}/bite"); + public Task BiteUser(string id) => + api.Call(HttpMethod.Post, $"/users/{id}/bite"); + public Task FollowUser(string id) => api.CallNullable(HttpMethod.Post, $"/users/{id}/follow"); public Task UnfollowUser(string id) => api.CallNullable(HttpMethod.Post, $"/users/{id}/unfollow"); } \ No newline at end of file