Fix formatting

This commit is contained in:
pancakes 2024-10-21 13:02:01 +10:00 committed by Iceshrimp development
parent 73b5706d05
commit e68ec89cdb
2 changed files with 5 additions and 2 deletions

View file

@ -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);
}

View file

@ -24,7 +24,9 @@ internal class UserControllerModel(ApiClient api)
return api.CallNullable<UserResponse>(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<bool> FollowUser(string id) => api.CallNullable(HttpMethod.Post, $"/users/{id}/follow");
public Task<bool> UnfollowUser(string id) => api.CallNullable(HttpMethod.Post, $"/users/{id}/unfollow");
}