mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 07:19:02 +00:00
Complete //todo's
This commit is contained in:
@@ -27,13 +27,14 @@ func (r *Request) Json(object JsonResponse, code int) {
|
||||
logrus.WithError(err).WithFields(logrus.Fields{
|
||||
"code": code,
|
||||
}).Error("Error during json encoding of object")
|
||||
return
|
||||
}
|
||||
|
||||
r.Ctx.Response.SetStatusCode(code)
|
||||
r.Ctx.Response.Header.Set("Content-Type", "application/json")
|
||||
_, err = r.Ctx.Write(resp)
|
||||
if err != nil {
|
||||
panic(err) //todo handle differently
|
||||
panic(err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user