Skip to content

Commit 01c265d

Browse files
committed
fix mtools api handler template
1 parent 4228ec9 commit 01c265d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

examples/blog/internal/blog/api/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func NewMain() *Main {
1414
}
1515

1616
func NewMainRoute(handler *Main) mHttp.RouteProvider {
17-
return mHttp.NewRouteProvider(
17+
return mHttp.ProvideInputRoute(
1818
"GET",
1919
"/",
2020
handler.Handle,

internal/mtools/templates/add_json_api/api_handler.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func New{{.StructName}}() *{{.StructName}} {
1616
}
1717

1818
func New{{.StructName}}Route(handler *{{.StructName}}) mHttp.RouteProvider {
19-
return mHttp.NewRouteProvider(
19+
return mHttp.ProvideInputRoute(
2020
"{{.Method}}",
2121
"{{.Uri}}",
2222
handler.Handle,

0 commit comments

Comments
 (0)