mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-25 19:55:41 +02:00
Lint fix
This commit is contained in:
parent
c3723d0fce
commit
ea27075bab
8 changed files with 10 additions and 10 deletions
|
@ -63,7 +63,7 @@ export async function getAllRelays(
|
|||
}
|
||||
|
||||
// Initialize mappings object for multi-peer support
|
||||
let mappings: { [key: string]: ProxyMapping } = {};
|
||||
const mappings: { [key: string]: ProxyMapping } = {};
|
||||
|
||||
// Process each site
|
||||
for (const site of sitesRes) {
|
||||
|
|
|
@ -238,7 +238,7 @@ export async function validateOidcCallback(
|
|||
const defaultRoleMapping = existingIdp.idp.defaultRoleMapping;
|
||||
const defaultOrgMapping = existingIdp.idp.defaultOrgMapping;
|
||||
|
||||
let userOrgInfo: { orgId: string; roleId: number }[] = [];
|
||||
const userOrgInfo: { orgId: string; roleId: number }[] = [];
|
||||
for (const org of allOrgs) {
|
||||
const [idpOrgRes] = await db
|
||||
.select()
|
||||
|
@ -314,7 +314,7 @@ export async function validateOidcCallback(
|
|||
|
||||
let existingUserId = existingUser?.userId;
|
||||
|
||||
let orgUserCounts: { orgId: string; userCount: number }[] = [];
|
||||
const orgUserCounts: { orgId: string; userCount: number }[] = [];
|
||||
|
||||
// sync the user with the orgs and roles
|
||||
await db.transaction(async (trx) => {
|
||||
|
|
|
@ -102,7 +102,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||
.where(eq(clientSites.clientId, client.clientId));
|
||||
|
||||
// Prepare an array to store site configurations
|
||||
let siteConfigurations = [];
|
||||
const siteConfigurations = [];
|
||||
logger.debug(`Found ${sitesData.length} sites for client ${client.clientId}`);
|
||||
|
||||
if (sitesData.length === 0) {
|
||||
|
|
|
@ -86,7 +86,7 @@ export async function pickSiteDefaults(
|
|||
.where(eq(sites.exitNodeId, exitNode.exitNodeId));
|
||||
|
||||
// TODO: we need to lock this subnet for some time so someone else does not take it
|
||||
let subnets = sitesQuery.map((site) => site.subnet).filter((subnet) => subnet !== null);
|
||||
const subnets = sitesQuery.map((site) => site.subnet).filter((subnet) => subnet !== null);
|
||||
// exclude the exit node address by replacing after the / with a site block size
|
||||
subnets.push(
|
||||
exitNode.address.replace(
|
||||
|
|
|
@ -15,8 +15,8 @@ export async function pickPort(siteId: number): Promise<{
|
|||
|
||||
// TODO: is this all inefficient?
|
||||
// Fetch targets for all resources of this site
|
||||
let targetIps: string[] = [];
|
||||
let targetInternalPorts: number[] = [];
|
||||
const targetIps: string[] = [];
|
||||
const targetInternalPorts: number[] = [];
|
||||
await Promise.all(
|
||||
resourcesRes.map(async (resource) => {
|
||||
const targetsRes = await db
|
||||
|
|
|
@ -62,7 +62,7 @@ const wss: WebSocketServer = new WebSocketServer({ noServer: true });
|
|||
const NODE_ID = uuidv4();
|
||||
|
||||
// Client tracking map (local to this node)
|
||||
let connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
|
||||
const connectedClients: Map<string, AuthenticatedWebSocket[]> = new Map();
|
||||
// Helper to get map key
|
||||
const getClientMapKey = (clientId: string) => clientId;
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ export default function Page() {
|
|||
return;
|
||||
}
|
||||
|
||||
let payload: CreateClientBody = {
|
||||
const payload: CreateClientBody = {
|
||||
name: data.name,
|
||||
type: data.method as "olm",
|
||||
siteIds: data.siteIds.map((site) => parseInt(site.id)),
|
||||
|
|
|
@ -34,7 +34,7 @@ export default async function RootLayout({
|
|||
const env = pullEnv();
|
||||
const locale = await getLocale();
|
||||
|
||||
let supporterData = {
|
||||
const supporterData = {
|
||||
visible: true
|
||||
} as any;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue