[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-01-19 08:59:45 +01:00
committed by Marc Fernandez
parent 33fb21bfe1
commit 95dd9ddeb6
4 changed files with 80 additions and 73 deletions
@@ -45,7 +45,8 @@ export const ClearDeployments = ({ id, type }: Props) => {
Are you sure you want to clear old deployments? Are you sure you want to clear old deployments?
</AlertDialogTitle> </AlertDialogTitle>
<AlertDialogDescription> <AlertDialogDescription>
This will delete all old deployment records and logs, keeping only the active deployment (the most recent successful one). This will delete all old deployment records and logs, keeping only
the active deployment (the most recent successful one).
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
<AlertDialogFooter> <AlertDialogFooter>
@@ -57,7 +58,9 @@ export const ClearDeployments = ({ id, type }: Props) => {
composeId: id || "", composeId: id || "",
}) })
.then(async (result) => { .then(async (result) => {
toast.success(`${result.deletedCount} old deployments cleared successfully`); toast.success(
`${result.deletedCount} old deployments cleared successfully`,
);
// Invalidate deployment queries to refresh the list // Invalidate deployment queries to refresh the list
await utils.deployment.allByType.invalidate({ await utils.deployment.allByType.invalidate({
id, id,
@@ -745,10 +745,13 @@ export const applicationRouter = createTRPCRouter({
) { ) {
throw new TRPCError({ throw new TRPCError({
code: "UNAUTHORIZED", code: "UNAUTHORIZED",
message: "You are not authorized to clear deployments for this application", message:
"You are not authorized to clear deployments for this application",
}); });
} }
const result = await clearOldDeploymentsByApplicationId(input.applicationId); const result = await clearOldDeploymentsByApplicationId(
input.applicationId,
);
return { return {
success: true, success: true,
message: `${result.deletedCount} old deployments cleared successfully`, message: `${result.deletedCount} old deployments cleared successfully`,
+2 -1
View File
@@ -263,7 +263,8 @@ export const composeRouter = createTRPCRouter({
) { ) {
throw new TRPCError({ throw new TRPCError({
code: "UNAUTHORIZED", code: "UNAUTHORIZED",
message: "You are not authorized to clear deployments for this compose", message:
"You are not authorized to clear deployments for this compose",
}); });
} }
const result = await clearOldDeploymentsByComposeId(input.composeId); const result = await clearOldDeploymentsByComposeId(input.composeId);