修改状态机的写法
This commit is contained in:
@@ -2,7 +2,7 @@ package basic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/shared"
|
||||
"fusenapi/utils/auth"
|
||||
"net/http"
|
||||
"reflect"
|
||||
@@ -51,7 +51,7 @@ func NormalAfterLogic(w http.ResponseWriter, r *http.Request, resp *Response) {
|
||||
}
|
||||
}
|
||||
|
||||
func RequestParse(w http.ResponseWriter, r *http.Request, state *fsm.SharedState, LogicRequest any) (*auth.UserInfo, error) {
|
||||
func RequestParse(w http.ResponseWriter, r *http.Request, state *shared.SharedState, LogicRequest any) (*auth.UserInfo, error) {
|
||||
// log.Println(io.ReadAll(r.Body))
|
||||
token, info, err := auth.ParseJwtTokenHeader[auth.UserInfo](r) //解析Token头, 和payload信息
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user