search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Security.Claims;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Registry.TokenService.Admin;
|
||||
|
||||
@@ -99,8 +100,8 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.NotFound(CreateProblemDetails(
|
||||
StatusCodes.Status404NotFound,
|
||||
"Plan Not Found",
|
||||
$"Plan with ID '{planId}' was not found."));
|
||||
_t("registry.error.plan_not_found"),
|
||||
_t("registry.error.plan_not_found_detail", planId)));
|
||||
}
|
||||
|
||||
return TypedResults.Ok(plan);
|
||||
@@ -120,8 +121,8 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.BadRequest(CreateProblemDetails(
|
||||
StatusCodes.Status400BadRequest,
|
||||
"Validation Failed",
|
||||
"The plan request is invalid.",
|
||||
_t("registry.error.validation_failed"),
|
||||
_t("registry.validation.plan_request_invalid"),
|
||||
validationResult.Errors));
|
||||
}
|
||||
|
||||
@@ -136,7 +137,7 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.Conflict(CreateProblemDetails(
|
||||
StatusCodes.Status409Conflict,
|
||||
"Name Conflict",
|
||||
_t("registry.error.plan_name_conflict"),
|
||||
ex.Message));
|
||||
}
|
||||
}
|
||||
@@ -173,8 +174,8 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.BadRequest(CreateProblemDetails(
|
||||
StatusCodes.Status400BadRequest,
|
||||
"Validation Failed",
|
||||
"The update request is invalid.",
|
||||
_t("registry.error.validation_failed"),
|
||||
_t("registry.validation.plan_update_invalid"),
|
||||
relevantErrors));
|
||||
}
|
||||
}
|
||||
@@ -190,21 +191,21 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.NotFound(CreateProblemDetails(
|
||||
StatusCodes.Status404NotFound,
|
||||
"Plan Not Found",
|
||||
$"Plan with ID '{planId}' was not found."));
|
||||
_t("registry.error.plan_not_found"),
|
||||
_t("registry.error.plan_not_found_detail", planId)));
|
||||
}
|
||||
catch (PlanVersionConflictException ex)
|
||||
{
|
||||
return TypedResults.Conflict(CreateProblemDetails(
|
||||
StatusCodes.Status409Conflict,
|
||||
"Version Conflict",
|
||||
_t("registry.error.plan_version_conflict"),
|
||||
ex.Message));
|
||||
}
|
||||
catch (PlanNameConflictException ex)
|
||||
{
|
||||
return TypedResults.Conflict(CreateProblemDetails(
|
||||
StatusCodes.Status409Conflict,
|
||||
"Name Conflict",
|
||||
_t("registry.error.plan_name_conflict"),
|
||||
ex.Message));
|
||||
}
|
||||
}
|
||||
@@ -222,8 +223,8 @@ public static class PlanAdminEndpoints
|
||||
{
|
||||
return TypedResults.NotFound(CreateProblemDetails(
|
||||
StatusCodes.Status404NotFound,
|
||||
"Plan Not Found",
|
||||
$"Plan with ID '{planId}' was not found."));
|
||||
_t("registry.error.plan_not_found"),
|
||||
_t("registry.error.plan_not_found_detail", planId)));
|
||||
}
|
||||
|
||||
return TypedResults.NoContent();
|
||||
|
||||
Reference in New Issue
Block a user