|
|
|
@@ -4,14 +4,22 @@ import ( |
|
|
|
"gitlink.org.cn/jcce-pcm/utils/result" |
|
|
|
"net/http" |
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/rest/httpx" |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/logic/core" |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc" |
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types" |
|
|
|
) |
|
|
|
|
|
|
|
func GetHashcatHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
|
|
|
return func(w http.ResponseWriter, r *http.Request) { |
|
|
|
var req types.GetHashcatHandlerReq |
|
|
|
if err := httpx.Parse(r, &req); err != nil { |
|
|
|
httpx.ErrorCtx(r.Context(), w, err) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
l := core.NewGetHashcatLogic(r.Context(), svcCtx) |
|
|
|
resp, err := l.GetHashcat() |
|
|
|
resp, err := l.GetHashcat(&req) |
|
|
|
result.HttpResult(r, w, resp, err) |
|
|
|
} |
|
|
|
} |