2022-04-06 21:04:51 +02:00

14 lines
346 B
TypeScript

import { ErrorHandler } from '$lib/database';
import { configureHAProxy } from '$lib/haproxy/configuration';
export default async function (): Promise<void | {
status: number;
body: { message: string; error: string };
}> {
try {
return await configureHAProxy();
} catch (error) {
return ErrorHandler(error.response?.body || error);
}
}