Unify error handling and HTTP statuses
Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -2,13 +2,14 @@ package challenge
|
||||
|
||||
import (
|
||||
challengeapischema "honoka-chan/internal/schema/api/challenge"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func challengeInfo() (res any, err error) {
|
||||
res = challengeapischema.InfoResp{
|
||||
Result: []any{},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user