Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: replace continue with if block to satisfy no-continue lint rule

bernie-g633b34a74853
diff --git a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
index 6dd4ee7c34..ae651ec647 100644
--- a/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
+++ b/backend/src/ee/services/gateway-v2/gateway-v2-service.ts
@@ -355,14 +355,15 @@ export const gatewayV2ServiceFactory = ({
const now = new Date();
const tokenStatusMap = new Map<string, "pending" | "expired">();
for (const token of allTokens) {
- if (token.usedAt || !token.gatewayId) continue;
- const isExpired = token.expiresAt <= now;
- const current = tokenStatusMap.get(token.gatewayId);
- // A non-expired token takes priority over an expired one
- if (!isExpired) {
- tokenStatusMap.set(token.gatewayId, "pending");
- } else if (!current) {
- tokenStatusMap.set(token.gatewayId, "expired");
+ if (!token.usedAt && token.gatewayId) {
+ const isExpired = token.expiresAt <= now;
+ const current = tokenStatusMap.get(token.gatewayId);
+ // A non-expired token takes priority over an expired one
+ if (!isExpired) {
+ tokenStatusMap.set(token.gatewayId, "pending");
+ } else if (!current) {
+ tokenStatusMap.set(token.gatewayId, "expired");
+ }
}
}
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
index 7eb7f01458..77f0bacb0d 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
@@ -48,10 +48,7 @@ import {
import { withPermission } from "@app/hoc";
import { usePopUp } from "@app/hooks";
import { gatewaysQueryKeys, useDeleteGatewayById } from "@app/hooks/api/gateways";
-import {
- useDeleteGatewayV2ById,
- useTriggerGatewayV2Heartbeat
-} from "@app/hooks/api/gateways-v2";
+import { useDeleteGatewayV2ById, useTriggerGatewayV2Heartbeat } from "@app/hooks/api/gateways-v2";
import { GatewayHealthCheckStatus } from "@app/hooks/api/gateways-v2/types";
import { EditGatewayDetailsModal } from "./components/EditGatewayDetailsModal";
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/ReEnrollGatewayModal.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/ReEnrollGatewayModal.tsx
index 0f4a36ce61..23ca477eb4 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/ReEnrollGatewayModal.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/ReEnrollGatewayModal.tsx
@@ -109,13 +109,10 @@ export const ReEnrollGatewayModal = ({ isOpen, onOpenChange, gatewayData }: Prop
</ModalContent>
)}
{step === "command" && (
- <ModalContent
- className="max-w-2xl"
- title={`Re-enroll ${gatewayData.name}`}
- >
+ <ModalContent className="max-w-2xl" title={`Re-enroll ${gatewayData.name}`}>
<p className="mb-3 text-sm text-mineshaft-300">
- Run the following command on the machine where you want to deploy the gateway. The
- token expires in 1 hour and can only be used once.
+ Run the following command on the machine where you want to deploy the gateway. The token
+ expires in 1 hour and can only be used once.
</p>
<FormLabel label="CLI Command" />
<div className="flex gap-2">