@@ -252,6 +252,14 @@ async fn main() -> std::io::Result<()> {
252252 storage:: subscription:: subscribe_to_key
253253 ) )
254254 . route ( "/auth/{user}" , web:: post ( ) . to ( security:: authentication:: access) )
255+ // Admin Dashboard Routes
256+ . route ( "/admin" , web:: get ( ) . to ( storage:: admin:: admin_dashboard) )
257+ . route ( "/admin/login" , web:: post ( ) . to ( storage:: admin:: admin_login) )
258+ . route ( "/admin/tables" , web:: get ( ) . to ( storage:: admin:: admin_get_tables) )
259+ . route ( "/admin/table/{table}/keys" , web:: get ( ) . to ( storage:: admin:: admin_get_keys) )
260+ . route ( "/admin/table/{table}/key/{key}" , web:: get ( ) . to ( storage:: admin:: admin_get_record) )
261+ . route ( "/admin/table/{table}/key/{key}" , web:: put ( ) . to ( storage:: admin:: admin_put_record) )
262+ . route ( "/admin/table/{table}/key/{key}" , web:: delete ( ) . to ( storage:: admin:: admin_delete_record) )
255263 . service ( get_stats)
256264 } )
257265 . bind_openssl ( bind_addr. as_str ( ) , builder) ?
@@ -297,6 +305,14 @@ async fn main() -> std::io::Result<()> {
297305 storage:: subscription:: subscribe_to_key
298306 ) )
299307 . route ( "/auth/{user}" , web:: post ( ) . to ( security:: authentication:: access) )
308+ // Admin Dashboard Routes
309+ . route ( "/admin" , web:: get ( ) . to ( storage:: admin:: admin_dashboard) )
310+ . route ( "/admin/login" , web:: post ( ) . to ( storage:: admin:: admin_login) )
311+ . route ( "/admin/tables" , web:: get ( ) . to ( storage:: admin:: admin_get_tables) )
312+ . route ( "/admin/table/{table}/keys" , web:: get ( ) . to ( storage:: admin:: admin_get_keys) )
313+ . route ( "/admin/table/{table}/key/{key}" , web:: get ( ) . to ( storage:: admin:: admin_get_record) )
314+ . route ( "/admin/table/{table}/key/{key}" , web:: put ( ) . to ( storage:: admin:: admin_put_record) )
315+ . route ( "/admin/table/{table}/key/{key}" , web:: delete ( ) . to ( storage:: admin:: admin_delete_record) )
300316 . service ( get_stats)
301317 } )
302318 . bind ( bind_addr. as_str ( ) ) ?
0 commit comments