mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 08:14:06 +00:00
Review fixes
This commit is contained in:
@@ -3,6 +3,7 @@ import { AxiosError } from "axios";
|
||||
import { request } from "@app/lib/config/request";
|
||||
import { BadRequestError } from "@app/lib/errors";
|
||||
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
||||
import { IntegrationUrls } from "@app/services/integration-auth/integration-list";
|
||||
|
||||
import { FlyioConnectionMethod } from "./flyio-connection-enums";
|
||||
import { TFlyioApp, TFlyioConnection, TFlyioConnectionConfig } from "./flyio-connection-types";
|
||||
@@ -20,7 +21,7 @@ export const validateFlyioConnectionCredentials = async (config: TFlyioConnectio
|
||||
|
||||
try {
|
||||
await request.post(
|
||||
"https://api.fly.io/graphql",
|
||||
IntegrationUrls.FLYIO_API_URL,
|
||||
{ query: "query { viewer { id email } }" },
|
||||
{
|
||||
headers: {
|
||||
@@ -47,7 +48,7 @@ export const listFlyioApps = async (appConnection: TFlyioConnection) => {
|
||||
const { accessToken } = appConnection.credentials;
|
||||
|
||||
const resp = await request.post<{ data: { apps: { nodes: TFlyioApp[] } } }>(
|
||||
"https://api.fly.io/graphql",
|
||||
IntegrationUrls.FLYIO_API_URL,
|
||||
{
|
||||
query:
|
||||
"query GetApps { apps { nodes { id name hostname status organization { id slug } currentRelease { version status createdAt } } } }"
|
||||
|
||||
@@ -16,6 +16,7 @@ export const FlyioConnectionAccessTokenCredentialsSchema = z.object({
|
||||
.trim()
|
||||
.min(1, "Access Token required")
|
||||
.max(1000)
|
||||
.startsWith("FlyV1", "Token must start with 'FlyV1'")
|
||||
.describe(AppConnections.CREDENTIALS.FLYIO.accessToken)
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user