优化代码
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-04 16:43:32 +08:00
parent ab22325ca7
commit 557d44aed8
11 changed files with 200 additions and 460 deletions

View File

@@ -10,11 +10,11 @@ public class NotificationController(INotificationService notificationService) :
try
{
var key = await notificationService.GetVapidPublicKeyAsync();
return BaseResponse<string>.Done(key);
return key.Ok<string>();
}
catch (Exception ex)
{
return BaseResponse<string>.Fail(ex.Message);
return ex.Message.Fail<string>();
}
}
@@ -27,7 +27,7 @@ public class NotificationController(INotificationService notificationService) :
}
catch (Exception ex)
{
return BaseResponse.Fail(ex.Message);
return ex.Message.Fail();
}
}
@@ -40,7 +40,7 @@ public class NotificationController(INotificationService notificationService) :
}
catch (Exception ex)
{
return BaseResponse.Fail(ex.Message);
return ex.Message.Fail();
}
}
}