mirror of
				https://github.com/khairul169/garage-webui.git
				synced 2025-10-31 07:09:32 +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);
 | |
|   });
 |