Improve API

This commit is contained in:
2023-04-02 17:31:37 +03:00
parent bc61b916f9
commit 11a6171954
12 changed files with 260 additions and 25 deletions

View File

@@ -86,7 +86,7 @@ func (s *Server) handleAddPageRequest(args [0]string, argsEscaped bool, w http.R
}
}()
var response *Page
var response AddPageRes
if m := s.cfg.Middleware; m != nil {
mreq := middleware.Request{
Context: ctx,
@@ -113,7 +113,7 @@ func (s *Server) handleAddPageRequest(args [0]string, argsEscaped bool, w http.R
type (
Request = OptAddPageReq
Params = AddPageParams
Response = *Page
Response = AddPageRes
)
response, err = middleware.HookMiddleware[
Request,