mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 12:16:36 +00:00
♻️ validate env and add remote fossorial API as an env variable
This commit is contained in:
@@ -17,12 +17,17 @@ import createHttpError from "http-errors";
|
||||
import logger from "@server/logger";
|
||||
import { response as sendResponse } from "@server/lib/response";
|
||||
import privateConfig from "#private/lib/config";
|
||||
import { GeneratedLicenseKey, ListGeneratedLicenseKeysResponse } from "@server/routers/generatedLicense/types";
|
||||
import {
|
||||
GeneratedLicenseKey,
|
||||
ListGeneratedLicenseKeysResponse
|
||||
} from "@server/routers/generatedLicense/types";
|
||||
import { pullEnv } from "@app/lib/pullEnv";
|
||||
|
||||
async function fetchLicenseKeys(orgId: string): Promise<any> {
|
||||
try {
|
||||
const env = pullEnv();
|
||||
const response = await fetch(
|
||||
`https://api.fossorial.io/api/v1/license-internal/enterprise/${orgId}/list`,
|
||||
`${env.app.fossorialRemoteAPIBaseUrl}/api/v1/license-internal/enterprise/${orgId}/list`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user