diff --git a/services/frontend/components/admin/runners/alertflowList.tsx b/services/frontend/components/admin/runners/alertflowList.tsx index 7010180..facd36c 100644 --- a/services/frontend/components/admin/runners/alertflowList.tsx +++ b/services/frontend/components/admin/runners/alertflowList.tsx @@ -24,9 +24,9 @@ import TimeAgo from "react-timeago"; import ChangeRunnerStatusModal from "@/components/functions/runner/changeStatus"; import DeleteRunnerModal from "@/components/functions/runner/delete"; import EditRunnerModal from "@/components/functions/runner/edit"; +import RunnerDrawer from "@/components/functions/runner/plugins"; import AdminAlertFlowRunnerDetails from "./AlertFlowRunnerDetails"; -import RunnerDrawer from "@/components/functions/runner/plugins"; export function AlertflowRunnerList({ runners, settings }: any) { const [status, setStatus] = React.useState(false); diff --git a/services/frontend/components/functions/admin/createToken.tsx b/services/frontend/components/functions/admin/createToken.tsx index 0a9ec5d..024a4b1 100644 --- a/services/frontend/components/functions/admin/createToken.tsx +++ b/services/frontend/components/functions/admin/createToken.tsx @@ -16,7 +16,6 @@ import React, { useState } from "react"; import { toast } from "sonner"; import ErrorCard from "@/components/error/ErrorCard"; -import CreateProjectToken from "@/lib/fetch/project/POST/CreateProjectToken"; import CreateServiceToken from "@/lib/fetch/admin/POST/CreateServiceToken"; export default function CreateServiceTokenModal({ diff --git a/services/frontend/components/notifications/notification-item.tsx b/services/frontend/components/notifications/notification-item.tsx index c78327b..5bd3837 100644 --- a/services/frontend/components/notifications/notification-item.tsx +++ b/services/frontend/components/notifications/notification-item.tsx @@ -1,14 +1,7 @@ "use client"; import { Icon } from "@iconify/react"; -import { - Avatar, - Badge, - Button, - Card, - CardBody, - Spacer, -} from "@heroui/react"; +import { Avatar, Badge, Button, Card, CardBody, Spacer } from "@heroui/react"; import { useRouter } from "next/navigation"; import React from "react"; import ReactTimeago from "react-timeago"; diff --git a/services/frontend/lib/fetch/flow/POST/CreateFlow.ts b/services/frontend/lib/fetch/flow/POST/CreateFlow.ts index e8d8cf7..ecc5e4a 100644 --- a/services/frontend/lib/fetch/flow/POST/CreateFlow.ts +++ b/services/frontend/lib/fetch/flow/POST/CreateFlow.ts @@ -35,19 +35,22 @@ export default async function CreateFlow( }; } - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/flows/`, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/flows/`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, + body: JSON.stringify({ + name, + description, + project_id: projectId, + runner_id: runnerId, + }), }, - body: JSON.stringify({ - name, - description, - project_id: projectId, - runner_id: runnerId, - }), - }); + ); if (!res.ok) { const errorData = await res.json(); diff --git a/services/frontend/lib/fetch/flow/all.ts b/services/frontend/lib/fetch/flow/all.ts index b6d9385..08e25fd 100644 --- a/services/frontend/lib/fetch/flow/all.ts +++ b/services/frontend/lib/fetch/flow/all.ts @@ -30,13 +30,16 @@ export async function GetFlows(): Promise { }; } - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/flows/`, { - method: "GET", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/flows/`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, }, - }); + ); if (!res.ok) { const errorData = await res.json(); diff --git a/services/frontend/lib/fetch/payload/payloads.ts b/services/frontend/lib/fetch/payload/payloads.ts index fffdba0..cf6f2ba 100644 --- a/services/frontend/lib/fetch/payload/payloads.ts +++ b/services/frontend/lib/fetch/payload/payloads.ts @@ -30,13 +30,16 @@ export async function GetPayloads(): Promise { }; } - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/payloads/`, { - method: "GET", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/payloads/`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, }, - }); + ); if (!res.ok) { const errorData = await res.json(); diff --git a/services/frontend/lib/fetch/project/POST/CreateProject.ts b/services/frontend/lib/fetch/project/POST/CreateProject.ts index 9f02bdb..91b9058 100644 --- a/services/frontend/lib/fetch/project/POST/CreateProject.ts +++ b/services/frontend/lib/fetch/project/POST/CreateProject.ts @@ -36,20 +36,23 @@ export default async function CreateProject( }; } - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/projects/`, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/projects/`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, + body: JSON.stringify({ + name, + description, + alertflow_runners: alertflowRunners, + icon, + color, + }), }, - body: JSON.stringify({ - name, - description, - alertflow_runners: alertflowRunners, - icon, - color, - }), - }); + ); if (!res.ok) { const errorData = await res.json(); diff --git a/services/frontend/lib/fetch/project/all.ts b/services/frontend/lib/fetch/project/all.ts index 28c8f4a..d14e11d 100644 --- a/services/frontend/lib/fetch/project/all.ts +++ b/services/frontend/lib/fetch/project/all.ts @@ -31,13 +31,16 @@ export async function GetProjects(): Promise { }; } - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/projects/`, { - method: "GET", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/projects/`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, }, - }); + ); if (!res.ok) { const errorData = await res.json(); diff --git a/services/frontend/lib/fetch/runner/get.ts b/services/frontend/lib/fetch/runner/get.ts index eb2d739..61a80e0 100644 --- a/services/frontend/lib/fetch/runner/get.ts +++ b/services/frontend/lib/fetch/runner/get.ts @@ -22,13 +22,16 @@ export async function GetRunners(): Promise { const cookieStore = await cookies(); const token = cookieStore.get("session"); - const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/v1/runners/`, { - method: "GET", - headers: { - "Content-Type": "application/json", - Authorization: token.value, + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/api/v1/runners/`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: token.value, + }, }, - }); + ); if (!res.ok) { const errorData = await res.json();