mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-02 00:55:48 +02:00
started integrating auth with lucia
This commit is contained in:
parent
a33a8d7367
commit
fc5dca136f
20 changed files with 1341 additions and 61 deletions
|
@ -4,16 +4,19 @@ import * as schema from "@server/db/schema";
|
|||
import { DynamicTraefikConfig } from "./configSchema";
|
||||
import { and, like, eq } from "drizzle-orm";
|
||||
import logger from "@server/logger";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
|
||||
export async function traefikConfigProvider(_: Request, res: Response) {
|
||||
try {
|
||||
const targets = await getAllTargets();
|
||||
const traefikConfig = buildTraefikConfig(targets);
|
||||
// logger.debug("Built traefik config");
|
||||
res.status(200).send(traefikConfig);
|
||||
res.status(HttpCode.OK).json(traefikConfig);
|
||||
} catch (e) {
|
||||
logger.error(`Failed to build traefik config: ${e}`);
|
||||
res.status(500).send({ message: "Failed to build traefik config" });
|
||||
res.status(HttpCode.INTERNAL_SERVER_ERROR).json({
|
||||
error: "Failed to build traefik config",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue