Fix formatting
This commit is contained in:
parent
73b5706d05
commit
e68ec89cdb
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
Loading…
Add table
Reference in a new issue