Unify error handling and HTTP statuses
Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
personalnoticeschema "honoka-chan/internal/schema/personalnotice"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -24,7 +25,7 @@ func get(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
ss.Respond(noticeResp)
|
||||
|
||||
Reference in New Issue
Block a user