feat: standardize REST and RPC routes

This commit is contained in:
2026-08-11 18:55:36 +08:00
parent 53e953c3fc
commit eed82bcf38
8 changed files with 89 additions and 22 deletions

View File

@@ -52,7 +52,7 @@ func (s *Server) Start(grpcAddr, httpAddr string, allow []string) error {
_ = httpListener.Close()
return err
}
s.HTTP.POST("/rpc/:method", s.dynamic.handle)
s.HTTP.POST("/rpc/:module/:service/:method", s.dynamic.handle)
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
recorder := newBufferedResponse()