mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-04-27 22:39:31 +07:00
22 lines
407 B
TypeScript
22 lines
407 B
TypeScript
import { Hono } from "hono";
|
|
import { config } from "../lib/garage";
|
|
|
|
export const configRoute = new Hono()
|
|
|
|
/**
|
|
* Get garage config
|
|
*/
|
|
.get("/", async (c) => {
|
|
const data = {
|
|
...(config || {}),
|
|
rpc_secret: undefined,
|
|
admin: {
|
|
...(config?.admin || {}),
|
|
admin_token: undefined,
|
|
metrics_token: undefined,
|
|
},
|
|
};
|
|
|
|
return c.json(data);
|
|
});
|