Commit b37d1ec3 authored by Cloud User's avatar Cloud User

set redirect

parent c22590e4
......@@ -1261,11 +1261,11 @@ func syncOrAsyncReturn(c *fiber.Ctx, resAsPb pbUpstream.TaskResponse, reqTaskId
if redirectCode {
if k == "Location" {
c.Redirect(v, resAsPb.TaskResultCode)
//c.Response().Header.SetL
//c.Response().Header.Set
//c.Response().Header.SetContentType(v)
//c.Set("Location", v)
c.Set("Location", v)
}
}
}
......@@ -1308,7 +1308,7 @@ func redirectReturn(c *fiber.Ctx, resAsPb pbUpstream.TaskResponse) error {
if resAsPb.TaskIsSucceed {
return c.Send(resAsPb.GetTaskResultBody())
return c.Status(int(resAsPb.TaskResultCode)).Send(resAsPb.GetTaskResultBody())
}
//fmt.Println("syncMode-------------", syncMode)
......@@ -1321,6 +1321,6 @@ func redirectReturn(c *fiber.Ctx, resAsPb pbUpstream.TaskResponse) error {
TaskError: resAsPb.TaskError,
}
return c.JSON(resAsJson)
return c.Status(int(resAsPb.TaskResultCode)).JSON(resAsJson)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment