merge: integrate sccsbc release preparation safely

This commit is contained in:
MingNian
2026-07-16 00:41:52 +08:00
38 changed files with 2974 additions and 45 deletions

View File

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

View File

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