merge: integrate sccsbc release preparation safely
This commit is contained in:
@@ -12,6 +12,8 @@ public static class AuthEndpoints
|
||||
ToResult(await auth.RegisterAsync(new RegisterCommand(request.Phone, request.SmsCode, request.Name, request.DoctorId), ct)));
|
||||
app.MapPost("/api/auth/login", async (LoginRequest request, IAuthService auth, CancellationToken ct) =>
|
||||
ToResult(await auth.LoginAsync(request.Phone, request.SmsCode, ct)));
|
||||
app.MapPost("/api/auth/apple-login", async (AppleLoginRequest request, IAuthService auth, CancellationToken ct) =>
|
||||
ToResult(await auth.AppleLoginAsync(new AppleLoginCommand(request.IdentityToken, request.AuthorizationCode, request.Name), ct)));
|
||||
app.MapPost("/api/auth/refresh", async (RefreshRequest request, IAuthService auth, CancellationToken ct) =>
|
||||
ToResult(await auth.RefreshAsync(request.RefreshToken, ct)));
|
||||
app.MapPost("/api/auth/logout", async (RefreshRequest request, IAuthService auth, CancellationToken ct) =>
|
||||
@@ -28,4 +30,5 @@ public static class AuthEndpoints
|
||||
public sealed record SendSmsRequest(string Phone);
|
||||
public sealed record RegisterRequest(string Phone, string SmsCode, string Name, Guid DoctorId);
|
||||
public sealed record LoginRequest(string Phone, string SmsCode);
|
||||
public sealed record AppleLoginRequest(string IdentityToken, string? AuthorizationCode, string? Name);
|
||||
public sealed record RefreshRequest(string RefreshToken);
|
||||
|
||||
@@ -125,7 +125,7 @@ public static class DoctorEndpoints
|
||||
{
|
||||
query = query.Where(u =>
|
||||
(u.Name != null && u.Name.Contains(search)) ||
|
||||
u.Phone.Contains(search));
|
||||
(u.Phone != null && u.Phone.Contains(search)));
|
||||
}
|
||||
var total = await query.CountAsync();
|
||||
var patients = await query.OrderByDescending(u => u.CreatedAt)
|
||||
|
||||
Reference in New Issue
Block a user