36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
// Code generated by hertz generator. DO NOT EDIT.
|
|
|
|
package auth
|
|
|
|
import (
|
|
auth "cn/oneao/base-go/biz/handler/auth"
|
|
"github.com/cloudwego/hertz/pkg/app/server"
|
|
)
|
|
|
|
/*
|
|
This file will register all the routes of the services in the master idl.
|
|
And it will update automatically when you use the "update" command for the idl.
|
|
So don't modify the contents of the file, or your code will be deleted when it is updated.
|
|
*/
|
|
|
|
// Register register routes based on the IDL 'api.${HTTP Method}' annotation.
|
|
func Register(r *server.Hertz) {
|
|
|
|
root := r.Group("/", rootMw()...)
|
|
{
|
|
_auth := root.Group("/auth", _authMw()...)
|
|
{
|
|
_login := _auth.Group("/login", _loginMw()...)
|
|
_login.POST("/default", append(_logindefaultMw(), auth.LoginDefault)...)
|
|
}
|
|
{
|
|
_refresh := _auth.Group("/refresh", _refreshMw()...)
|
|
_refresh.GET("/token", append(_refreshaccesstokenMw(), auth.RefreshAccessToken)...)
|
|
}
|
|
{
|
|
_register := _auth.Group("/register", _registerMw()...)
|
|
_register.POST("/default", append(_registerdefaultMw(), auth.RegisterDefault)...)
|
|
}
|
|
}
|
|
}
|