兼容无token下拉取任务列表
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"net/http"
|
||||
"nova_task/internal/logic/task"
|
||||
"nova_task/internal/pkg/encrypt/jwt"
|
||||
"nova_task/internal/svc"
|
||||
"nova_task/internal/types"
|
||||
)
|
||||
@@ -17,8 +18,10 @@ func GetTaskListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
uid, _ := jwt.ParseUid(r, svcCtx.Config.Auth.AccessSecret)
|
||||
|
||||
l := task.NewGetTaskListLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetTaskList(&req)
|
||||
resp, err := l.GetTaskList(uid, &req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user