mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-10 21:48:52 +00:00
bunch of probably useless micro optimisation
This commit is contained in:
@@ -13,8 +13,8 @@ import (
|
||||
type RequestHandler func(*Request)
|
||||
|
||||
type GetLogRequest struct {
|
||||
Level logrus.Level `json:"level"`
|
||||
Since int64 `json:"since"`
|
||||
Level storage.LogLevel `json:"level"`
|
||||
Since int64 `json:"since"`
|
||||
}
|
||||
|
||||
type LogRequest struct {
|
||||
|
||||
@@ -75,8 +75,8 @@ func (api *WebAPI) TaskCreate(r *Request) {
|
||||
if err != nil {
|
||||
r.Json(CreateTaskResponse{
|
||||
Ok: false,
|
||||
Message: err.Error(), //todo: hide sensitive error?
|
||||
}, 500)
|
||||
Message: err.Error(),
|
||||
}, 400)
|
||||
} else {
|
||||
r.OkJson(CreateTaskResponse{
|
||||
Ok: true,
|
||||
|
||||
Reference in New Issue
Block a user