@@ -120,20 +120,15 @@ pub fn get_gateway_connection_config(
120120
121121/// Get all MCPs configured for the gateway
122122#[ tauri:: command]
123- pub fn get_gateway_mcps (
124- db : State < ' _ , Arc < Mutex < Database > > > ,
125- ) -> Result < Vec < GatewayMcp > , String > {
123+ pub fn get_gateway_mcps ( db : State < ' _ , Arc < Mutex < Database > > > ) -> Result < Vec < GatewayMcp > , String > {
126124 info ! ( "[GatewayCmd] Getting gateway MCPs" ) ;
127125 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
128126 db. get_gateway_mcps ( ) . map_err ( |e| e. to_string ( ) )
129127}
130128
131129/// Add an MCP to the gateway
132130#[ tauri:: command]
133- pub fn add_mcp_to_gateway (
134- db : State < ' _ , Arc < Mutex < Database > > > ,
135- mcp_id : i64 ,
136- ) -> Result < ( ) , String > {
131+ pub fn add_mcp_to_gateway ( db : State < ' _ , Arc < Mutex < Database > > > , mcp_id : i64 ) -> Result < ( ) , String > {
137132 info ! ( "[GatewayCmd] Adding MCP {} to gateway" , mcp_id) ;
138133 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
139134 db. add_gateway_mcp ( mcp_id) . map_err ( |e| e. to_string ( ) )
@@ -157,9 +152,13 @@ pub fn toggle_gateway_mcp(
157152 mcp_id : i64 ,
158153 enabled : bool ,
159154) -> Result < ( ) , String > {
160- info ! ( "[GatewayCmd] Toggling gateway MCP {} to {}" , mcp_id, enabled) ;
155+ info ! (
156+ "[GatewayCmd] Toggling gateway MCP {} to {}" ,
157+ mcp_id, enabled
158+ ) ;
161159 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
162- db. toggle_gateway_mcp ( mcp_id, enabled) . map_err ( |e| e. to_string ( ) )
160+ db. toggle_gateway_mcp ( mcp_id, enabled)
161+ . map_err ( |e| e. to_string ( ) )
163162}
164163
165164/// Set auto-restart for a gateway MCP
@@ -169,17 +168,18 @@ pub fn set_gateway_mcp_auto_restart(
169168 mcp_id : i64 ,
170169 auto_restart : bool ,
171170) -> Result < ( ) , String > {
172- info ! ( "[GatewayCmd] Setting gateway MCP {} auto_restart to {}" , mcp_id, auto_restart) ;
171+ info ! (
172+ "[GatewayCmd] Setting gateway MCP {} auto_restart to {}" ,
173+ mcp_id, auto_restart
174+ ) ;
173175 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
174- db. set_gateway_mcp_auto_restart ( mcp_id, auto_restart) . map_err ( |e| e. to_string ( ) )
176+ db. set_gateway_mcp_auto_restart ( mcp_id, auto_restart)
177+ . map_err ( |e| e. to_string ( ) )
175178}
176179
177180/// Check if an MCP is in the gateway
178181#[ tauri:: command]
179- pub fn is_mcp_in_gateway (
180- db : State < ' _ , Arc < Mutex < Database > > > ,
181- mcp_id : i64 ,
182- ) -> Result < bool , String > {
182+ pub fn is_mcp_in_gateway ( db : State < ' _ , Arc < Mutex < Database > > > , mcp_id : i64 ) -> Result < bool , String > {
183183 let db = db. lock ( ) . map_err ( |e| e. to_string ( ) ) ?;
184184 db. is_mcp_in_gateway ( mcp_id) . map_err ( |e| e. to_string ( ) )
185185}
0 commit comments