Рабочий чат
This commit is contained in:
@@ -18,9 +18,9 @@ public static class ProfilesEndpoints
|
||||
{
|
||||
var group = app.MapGroup("api/profiles").RequireAuthorization();
|
||||
|
||||
group.MapGet("search", async ([FromQuery] string q, ISender sender, CancellationToken ct) =>
|
||||
group.MapGet("search", async ([FromQuery] string q, ISender sender, IUserContext userContext, CancellationToken ct) =>
|
||||
{
|
||||
var result = await sender.Send(new SearchProfilesQuery(q), ct);
|
||||
var result = await sender.Send(new SearchProfilesQuery(q, userContext.UserId), ct);
|
||||
return result.IsSuccess ? Results.Ok(result.Value) : Results.BadRequest(result.Error);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user