some fixes
This commit is contained in:
parent
9e68b46346
commit
fa65b381a4
7 changed files with 37 additions and 26 deletions
|
|
@ -22,10 +22,6 @@ func local(h types.CtxHandler) types.CtxHandler {
|
|||
}
|
||||
}
|
||||
|
||||
func healthzHandler(ctx *types.Context) {
|
||||
ctx.OK()
|
||||
}
|
||||
|
||||
func newHandler(ctx *types.Context) {
|
||||
if ctx.Method() == "POST" {
|
||||
b, err := ctx.ReadBody()
|
||||
|
|
|
|||
|
|
@ -9,18 +9,12 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
healthz = "/healthz"
|
||||
keyID = schema.KeyPath + core.IDRoute
|
||||
keyReqID = schema.KeyPath + core.IDRoute + core.AIDRoute
|
||||
reqID = schema.ReqPath + core.IDRoute
|
||||
)
|
||||
|
||||
var Routes = []types.Route{
|
||||
{
|
||||
Path: healthz,
|
||||
Handler: healthzHandler,
|
||||
Methods: []string{"GET"},
|
||||
},
|
||||
{
|
||||
Path: schema.KeyPath,
|
||||
Handler: local(keyListHandler),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue