Unify error handling and HTTP statuses
Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
achievementschema "honoka-chan/internal/schema/achievement"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -36,7 +37,7 @@ func pagingAccomplishedList(ctx *gin.Context) {
|
||||
ss.Respond(achievementschema.PagingAccomplishedListResp{
|
||||
ResponseData: items[start:end],
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
albumschema "honoka-chan/internal/schema/album"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -81,7 +82,7 @@ func seriesAll(ctx *gin.Context) {
|
||||
ss.Respond(albumschema.SeriesAllResp{
|
||||
ResponseData: albumSeriesAllRes,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
announceschema "honoka-chan/internal/schema/announce"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -20,7 +21,7 @@ func checkState(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package achievement
|
||||
import (
|
||||
achievementapischema "honoka-chan/internal/schema/api/achievement"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -37,7 +38,7 @@ func initialAccomplishedList(ctx *gin.Context) (res any, err error) {
|
||||
|
||||
return achievementapischema.UnaccomplishListResp{
|
||||
Result: listData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, nil
|
||||
|
||||
@@ -2,6 +2,7 @@ package achievement
|
||||
|
||||
import (
|
||||
achievementapischema "honoka-chan/internal/schema/api/achievement"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -18,7 +19,7 @@ func unaccomplishList() (res any, err error) {
|
||||
|
||||
res = achievementapischema.UnaccomplishListResp{
|
||||
Result: listData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package album
|
||||
import (
|
||||
albumapischema "honoka-chan/internal/schema/api/album"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -61,7 +62,7 @@ func albumAll(ctx *gin.Context) (res any, err error) {
|
||||
|
||||
res = albumapischema.AllResp{
|
||||
Result: albumLists,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"honoka-chan/internal/constant"
|
||||
"honoka-chan/internal/handler/api/achievement"
|
||||
"honoka-chan/internal/handler/api/album"
|
||||
"honoka-chan/internal/handler/api/award"
|
||||
@@ -33,10 +32,9 @@ import (
|
||||
"honoka-chan/internal/middleware"
|
||||
"honoka-chan/internal/router"
|
||||
apischema "honoka-chan/internal/schema/api"
|
||||
commonschema "honoka-chan/internal/schema/common"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"time"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -117,15 +115,8 @@ func api(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
if honokautils.IsUnimplementedError(err) {
|
||||
results = append(results, commonschema.ApiErrorResp{
|
||||
Result: commonschema.ErrorData{
|
||||
ErrorCode: constant.ErrorCodeUnknown,
|
||||
},
|
||||
Status: 600,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
})
|
||||
continue
|
||||
ss.AbortWithStatus(http.StatusNotFound, honokautils.NewDetailContent(err.Error()))
|
||||
return
|
||||
}
|
||||
if ss.CheckErr(err) {
|
||||
return
|
||||
@@ -136,7 +127,7 @@ func api(ctx *gin.Context) {
|
||||
apiResp := apischema.ApiResp{
|
||||
ResponseData: results,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
ss.Respond(apiResp)
|
||||
|
||||
@@ -3,6 +3,7 @@ package award
|
||||
import (
|
||||
awardapischema "honoka-chan/internal/schema/api/award"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -40,7 +41,7 @@ func awardInfo(ctx *gin.Context) (res any, err error) {
|
||||
Result: awardapischema.InfoData{
|
||||
AwardInfo: awardsList,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package background
|
||||
import (
|
||||
backgroundapischema "honoka-chan/internal/schema/api/background"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -40,7 +41,7 @@ func backgroundInfo(ctx *gin.Context) (res any, err error) {
|
||||
Result: backgroundapischema.InfoData{
|
||||
BackgroundInfo: backgroundsList,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package banner
|
||||
|
||||
import (
|
||||
bannerapischema "honoka-chan/internal/schema/api/banner"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -63,7 +64,7 @@ func bannerList() (res any, err error) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package costume
|
||||
|
||||
import (
|
||||
costumeapischema "honoka-chan/internal/schema/api/costume"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -10,7 +11,7 @@ func costumeList() (res any, err error) {
|
||||
Result: costumeapischema.ListData{
|
||||
CostumeList: []costumeapischema.CostumeList{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
eventscenarioapischema "honoka-chan/internal/schema/api/eventscenario"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -71,7 +72,7 @@ func eventScenarioStatus(ctx *gin.Context) (res any, err error) {
|
||||
Result: eventscenarioapischema.StatusData{
|
||||
EventScenarioList: eventsList,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package exchange
|
||||
import (
|
||||
exchangeapischema "honoka-chan/internal/schema/api/exchange"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -28,7 +29,7 @@ func owningPoint(ctx *gin.Context) (res any, err error) {
|
||||
Result: exchangeapischema.OwningPointData{
|
||||
ExchangePointList: exPointsList,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package item
|
||||
import (
|
||||
itemapischema "honoka-chan/internal/schema/api/item"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -14,7 +15,7 @@ func itemList() (res any, err error) {
|
||||
|
||||
res = itemapischema.ListResp{
|
||||
Result: itemData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package live
|
||||
import (
|
||||
liveapischema "honoka-chan/internal/schema/api/live"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -36,7 +37,7 @@ func liveSchedule(ctx *gin.Context) (res any, err error) {
|
||||
FreeLiveList: []any{},
|
||||
TrainingLiveList: []liveapischema.TrainingLiveList{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package live
|
||||
import (
|
||||
liveapischema "honoka-chan/internal/schema/api/live"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -46,7 +47,7 @@ func liveStatus(ctx *gin.Context) (res any, err error) {
|
||||
FreeLiveStatusList: []any{},
|
||||
CanResumeLive: true,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package liveicon
|
||||
|
||||
import (
|
||||
liveiconapischema "honoka-chan/internal/schema/api/liveicon"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -10,7 +11,7 @@ func liveIconInfo() (res any, err error) {
|
||||
Result: liveiconapischema.InfoData{
|
||||
LiveNotesIconList: []int{1, 2, 3},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package livese
|
||||
|
||||
import (
|
||||
liveseapischema "honoka-chan/internal/schema/api/livese"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -10,7 +11,7 @@ func LiveSeInfo() (res any, err error) {
|
||||
Result: liveseapischema.InfoData{
|
||||
LiveSeList: []int{1, 2, 3},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
usermodel "honoka-chan/internal/model/user"
|
||||
loginapischema "honoka-chan/internal/schema/api/login"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -68,7 +69,7 @@ func loginTopInfo(ctx *gin.Context) (res any, err error) {
|
||||
AdFlag: false,
|
||||
HasAdReward: false,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: now.Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package login
|
||||
import (
|
||||
loginapischema "honoka-chan/internal/schema/api/login"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -36,7 +37,7 @@ func loginTopInfoOnce(ctx *gin.Context) (res any, err error) {
|
||||
ArenaSiSkillUniqueCheck: true,
|
||||
OpenV98: true,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@ package marathon
|
||||
|
||||
import (
|
||||
marathonapischema "honoka-chan/internal/schema/api/marathon"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func marathonInfo() (res any, err error) {
|
||||
res = marathonapischema.InfoResp{
|
||||
Result: []any{},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package multiunit
|
||||
import (
|
||||
multiunitapischema "honoka-chan/internal/schema/api/multiunit"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -53,7 +54,7 @@ func MultiUnitScenarioStatus(ctx *gin.Context) (res any, err error) {
|
||||
MultiUnitScenarioStatusList: multiUnitsList,
|
||||
UnlockedMultiUnitScenarioIds: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package museum
|
||||
import (
|
||||
museumapischema "honoka-chan/internal/schema/api/museum"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -42,7 +43,7 @@ func museumInfo(ctx *gin.Context) (res any, err error) {
|
||||
ContentsIDList: museumID,
|
||||
},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package navigation
|
||||
|
||||
import (
|
||||
navigationapischema "honoka-chan/internal/schema/api/navigation"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -10,7 +11,7 @@ func SpecialCutin() (res any, err error) {
|
||||
Result: navigationapischema.SpecialCutinData{
|
||||
SpecialCutinList: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package notice
|
||||
|
||||
import (
|
||||
noticeapischema "honoka-chan/internal/schema/api/notice"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -11,7 +12,7 @@ func noticeMarquee() (res any, err error) {
|
||||
ItemCount: 0,
|
||||
MarqueeList: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package payment
|
||||
import (
|
||||
paymentapischema "honoka-chan/internal/schema/api/payment"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -27,7 +28,7 @@ func productList(ctx *gin.Context) (res any, err error) {
|
||||
SubscriptionList: []paymentapischema.Subscription{},
|
||||
ShowPointShop: false,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package profile
|
||||
import (
|
||||
profileapischema "honoka-chan/internal/schema/api/profile"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -14,7 +15,7 @@ func cardRanking() (res any, err error) {
|
||||
|
||||
res = profileapischema.CardRankingResp{
|
||||
Result: cardRankingData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
usermodel "honoka-chan/internal/model/user"
|
||||
profileapischema "honoka-chan/internal/schema/api/profile"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -89,7 +90,7 @@ func profileInfo(ctx *gin.Context, targetUserID int) (res any, err error) {
|
||||
SettingAwardID: targetPref.AwardID,
|
||||
SettingBackgroundID: targetPref.BackgroundID,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
usermodel "honoka-chan/internal/model/user"
|
||||
profileapischema "honoka-chan/internal/schema/api/profile"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
@@ -82,7 +83,7 @@ func liveCnt(ctx *gin.Context, targetUserID int) (res any, err error) {
|
||||
|
||||
res = profileapischema.LiveCntResp{
|
||||
Result: result,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package reward
|
||||
|
||||
import (
|
||||
rewardapischema "honoka-chan/internal/schema/api/reward"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -12,7 +13,7 @@ func rewardHistory() (res any, err error) {
|
||||
Limit: 20,
|
||||
History: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package reward
|
||||
|
||||
import (
|
||||
rewardapischema "honoka-chan/internal/schema/api/reward"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -13,7 +14,7 @@ func rewardList() (res any, err error) {
|
||||
Order: 0,
|
||||
Items: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package scenario
|
||||
import (
|
||||
scenarioapischema "honoka-chan/internal/schema/api/scenario"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -28,7 +29,7 @@ func scenarioStatus(ctx *gin.Context) (res any, err error) {
|
||||
Result: scenarioapischema.StatusData{
|
||||
ScenarioStatusList: scenarioLists,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package secretbox
|
||||
import (
|
||||
secretboxapischema "honoka-chan/internal/schema/api/secretbox"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -35,7 +36,7 @@ func all() (res any, err error) {
|
||||
|
||||
res = secretboxapischema.AllResp{
|
||||
Result: secretBoxData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package stamp
|
||||
import (
|
||||
stampapischema "honoka-chan/internal/schema/api/stamp"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -14,7 +15,7 @@ func stampInfo() (res any, err error) {
|
||||
|
||||
res = stampapischema.InfoResp{
|
||||
Result: stampData,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package subscenario
|
||||
import (
|
||||
subscenarioapischema "honoka-chan/internal/schema/api/subscenario"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -29,7 +30,7 @@ func subscenarioStatus(ctx *gin.Context) (res any, err error) {
|
||||
SubscenarioStatusList: subScenarioLists,
|
||||
UnlockedSubscenarioIds: []any{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package unit
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -34,7 +35,7 @@ func unitAccessoryAll(ctx *gin.Context) (res any, err error) {
|
||||
WearingInfo: wearingInfo,
|
||||
EspecialCreateFlag: false,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@ package unit
|
||||
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func unitAccessoryMaterialAll() (res any, err error) {
|
||||
res = unitapischema.AccessoryMaterialAllResp{
|
||||
Result: unitapischema.AccessoryMaterialAllData{},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package unit
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -16,7 +17,7 @@ func unitAccessoryTab() (res any, err error) {
|
||||
Result: unitapischema.AccessoryTabData{
|
||||
TabList: tabList,
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
unitmodel "honoka-chan/internal/model/unit"
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -55,7 +56,7 @@ func unitAll(ctx *gin.Context) (res any, err error) {
|
||||
Active: unitsData,
|
||||
Waiting: []unitapischema.Waiting{},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package unit
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -46,7 +47,7 @@ func unitDeckInfo(ctx *gin.Context) (res any, err error) {
|
||||
}
|
||||
res = unitapischema.DeckInfoResp{
|
||||
Result: unitDeckInfo,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package unit
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -67,7 +68,7 @@ func unitRemovableSkillInfo(ctx *gin.Context) (res any, err error) {
|
||||
OwningInfo: owingInfo,
|
||||
EquipmentInfo: equipInfo,
|
||||
}, // 宝石
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package unit
|
||||
|
||||
import (
|
||||
unitapischema "honoka-chan/internal/schema/api/unit"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -10,7 +11,7 @@ func unitSupporterAll() (res any, err error) {
|
||||
Result: unitapischema.SupporterAllData{
|
||||
UnitSupportList: []unitapischema.SupporterList{},
|
||||
}, // 练习道具
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package user
|
||||
import (
|
||||
userapischema "honoka-chan/internal/schema/api/user"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -24,7 +25,7 @@ func userGetNavi(ctx *gin.Context) (res any, err error) {
|
||||
UnitOwningUserID: oID,
|
||||
},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
userapischema "honoka-chan/internal/schema/api/user"
|
||||
userschema "honoka-chan/internal/schema/user"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -20,7 +21,7 @@ func userInfo(ctx *gin.Context) (res any, err error) {
|
||||
BirthDay: ss.UserPref.EffectiveBirthDay(),
|
||||
},
|
||||
},
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
awardschema "honoka-chan/internal/schema/award"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tidwall/gjson"
|
||||
@@ -28,7 +29,7 @@ func set(ctx *gin.Context) {
|
||||
ss.Respond(awardschema.SetResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
backgroundschema "honoka-chan/internal/schema/background"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tidwall/gjson"
|
||||
@@ -28,7 +29,7 @@ func set(ctx *gin.Context) {
|
||||
ss.Respond(backgroundschema.SetResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/middleware"
|
||||
"honoka-chan/internal/router"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -33,7 +34,7 @@ func list(ctx *gin.Context) {
|
||||
ss.Respond(bannerResp{
|
||||
ResponseData: extractBannerResult(data),
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
downloadschema "honoka-chan/internal/schema/download"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -42,7 +43,7 @@ func additional(ctx *gin.Context) {
|
||||
ss.Respond(downloadschema.AdditionalResp{
|
||||
ResponseData: pkgList,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
downloadschema "honoka-chan/internal/schema/download"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"xorm.io/builder"
|
||||
@@ -57,7 +58,7 @@ func batch(ctx *gin.Context) {
|
||||
ss.Respond(downloadschema.BatchResp{
|
||||
ResponseData: pkgList,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
downloadschema "honoka-chan/internal/schema/download"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -16,7 +17,7 @@ func event(ctx *gin.Context) {
|
||||
ss.Respond(downloadschema.EventResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
downloadschema "honoka-chan/internal/schema/download"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -34,7 +35,7 @@ func getUrl(ctx *gin.Context) {
|
||||
UrlList: urlList,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ func update(ctx *gin.Context) {
|
||||
ss.Respond(downloadschema.UpdateResp{
|
||||
ResponseData: pkgList,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ func list(ctx *gin.Context) {
|
||||
ErrorCode: constant.ErrorCodeEventNoEventData,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 600,
|
||||
StatusCode: constant.ErrorCodeAcceptableError,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
eventscenarioschema "honoka-chan/internal/schema/eventscenario"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -23,7 +24,7 @@ func startup(ctx *gin.Context) {
|
||||
ss.Respond(eventscenarioschema.StartUpResp{
|
||||
ResponseData: eventscenarioschema.StartUpData{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -45,7 +46,7 @@ func expel(ctx *gin.Context) {
|
||||
ss.Respond(friendschema.ExpelResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -121,7 +122,7 @@ func list(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -41,7 +42,7 @@ func request(ctx *gin.Context) {
|
||||
IsFriend: true,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -75,7 +76,7 @@ func request(ctx *gin.Context) {
|
||||
IsFriend: true,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -94,7 +95,7 @@ func request(ctx *gin.Context) {
|
||||
IsFriend: false,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -54,7 +55,7 @@ func requestCancel(ctx *gin.Context) {
|
||||
IsFriend: isFriend,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -59,7 +60,7 @@ func response(ctx *gin.Context) {
|
||||
ss.Respond(friendschema.ResponseResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
friendschema "honoka-chan/internal/schema/friend"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -112,7 +113,7 @@ func search(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
gdprschema "honoka-chan/internal/schema/gdpr"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -21,7 +22,7 @@ func get(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package greet
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"honoka-chan/internal/middleware"
|
||||
usermodel "honoka-chan/internal/model/user"
|
||||
@@ -57,7 +58,7 @@ func deleteMail(ctx *gin.Context) {
|
||||
ss.Respond(greetschema.EmptyResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package greet
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -76,7 +77,7 @@ func user(ctx *gin.Context) {
|
||||
ss.Respond(greetschema.EmptyResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
lbonusschema "honoka-chan/internal/schema/lbonus"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -148,7 +149,7 @@ func execute(ctx *gin.Context) {
|
||||
PresentCnt: 0,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
ss.Respond(resp)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
liveschema "honoka-chan/internal/schema/live"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -25,7 +26,7 @@ func BuildContinueResp(ss *session.Session) liveschema.ContinueResp {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
liveschema "honoka-chan/internal/schema/live"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -25,7 +26,7 @@ func BuildGameOverResp() liveschema.GameOverResp {
|
||||
return liveschema.GameOverResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
liveschema "honoka-chan/internal/schema/live"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -22,7 +23,7 @@ func partyList(ctx *gin.Context) {
|
||||
ss.Respond(liveschema.PartyListResp{
|
||||
ResponseData: partyListData,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"math"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -322,7 +323,7 @@ func BuildPlayResp(ss *session.Session, playReq liveschema.PlayReq, isRandom boo
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
liverecordschema "honoka-chan/internal/schema/liverecord"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -88,7 +89,7 @@ func preciseScore(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
} else {
|
||||
// 如果有 Live 记录
|
||||
@@ -181,7 +182,7 @@ func preciseScore(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
} else {
|
||||
playResp = liveschema.PreciseScoreResp{
|
||||
@@ -189,7 +190,7 @@ func preciseScore(ctx *gin.Context) {
|
||||
ErrorCode: constant.ErrorCodeLivePreciseListNotFound,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 600,
|
||||
StatusCode: constant.ErrorCodeAcceptableError,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"honoka-chan/pkg/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -172,7 +173,7 @@ func BuildRewardResp(ss *session.Session, playRewardReq liveschema.RewardReq, is
|
||||
PresentCnt: 0,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
if playRewardReq.MaxCombo >= liveInfo.SRankCombo {
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
"honoka-chan/pkg/encrypt"
|
||||
utils "honoka-chan/pkg/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -51,7 +52,7 @@ func authKey(ctx *gin.Context) {
|
||||
DummyToken: serverToken,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
"honoka-chan/pkg/encrypt"
|
||||
"honoka-chan/pkg/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -81,7 +82,7 @@ func login(ctx *gin.Context) {
|
||||
AdultFlag: 2,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
multiunitschema "honoka-chan/internal/schema/multiunit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -28,7 +29,7 @@ func scenarioStartup(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
museumschema "honoka-chan/internal/schema/museum"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -46,7 +47,7 @@ func info(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
ss.Respond(museumResp)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
noticeschema "honoka-chan/internal/schema/notice"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -80,7 +81,7 @@ func friendGreeting(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
noticeschema "honoka-chan/internal/schema/notice"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -21,7 +22,7 @@ func friendVariety(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
noticeschema "honoka-chan/internal/schema/notice"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -68,7 +69,7 @@ func userGreetingHistory(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
paymentapischema "honoka-chan/internal/schema/api/payment"
|
||||
paymentschema "honoka-chan/internal/schema/payment"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -33,7 +34,7 @@ func productList(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
ss.Respond(prodResp)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
profileschema "honoka-chan/internal/schema/profile"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tidwall/gjson"
|
||||
@@ -28,7 +29,7 @@ func register(ctx *gin.Context) {
|
||||
ss.Respond(profileschema.RegisterResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
rankingschema "honoka-chan/internal/schema/ranking"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -103,7 +104,7 @@ func live(ctx *gin.Context) {
|
||||
Page: page,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
rewardschema "honoka-chan/internal/schema/reward"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -20,7 +21,7 @@ func history(ctx *gin.Context) {
|
||||
History: []any{},
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
rewardschema "honoka-chan/internal/schema/reward"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -21,7 +22,7 @@ func list(ctx *gin.Context) {
|
||||
Items: []any{},
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ func sellUnit(ctx *gin.Context) {
|
||||
ErrorCode: constant.ErrorCodeNoUnitIsSellable,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 600,
|
||||
StatusCode: constant.ErrorCodeAcceptableError,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
pkgutils "honoka-chan/pkg/utils"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
@@ -67,7 +68,7 @@ func lot(ctx *gin.Context) {
|
||||
Token: randomLive.Token,
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
scenarioschema "honoka-chan/internal/schema/scenario"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -28,7 +29,7 @@ func startup(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
secretboxschema "honoka-chan/internal/schema/secretbox"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -28,7 +29,7 @@ func multi(ctx *gin.Context) {
|
||||
ss.Respond(secretboxschema.MultiResp{
|
||||
ResponseData: data,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -33,7 +34,7 @@ func pon(ctx *gin.Context) {
|
||||
ss.Respond(secretboxschema.PonResp{
|
||||
ResponseData: data,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"honoka-chan/pkg/db"
|
||||
"net/http"
|
||||
"sort"
|
||||
"time"
|
||||
)
|
||||
@@ -21,7 +22,7 @@ func loadSecretBoxAllData() (secretboxapischema.AllResp, error) {
|
||||
|
||||
return secretboxapischema.AllResp{
|
||||
Result: data,
|
||||
Status: 200,
|
||||
Status: http.StatusOK,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}, nil
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
secretboxschema "honoka-chan/internal/schema/secretbox"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -29,7 +30,7 @@ func showDetail(ctx *gin.Context) {
|
||||
ss.Respond(secretboxschema.ShowDetailResp{
|
||||
ResponseData: data,
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
subscenarioschema "honoka-chan/internal/schema/subscenario"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -28,7 +29,7 @@ func startup(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/router"
|
||||
tosschema "honoka-chan/internal/schema/tos"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -22,7 +23,7 @@ func check(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -101,7 +102,7 @@ func deck(ctx *gin.Context) {
|
||||
ss.Respond(unitschema.DeckResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -40,7 +41,7 @@ func deckName(ctx *gin.Context) {
|
||||
ss.Respond(unitschema.DeckResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -33,7 +34,7 @@ func favorite(ctx *gin.Context) {
|
||||
ss.Respond(unitschema.FavoriteResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"honoka-chan/internal/middleware"
|
||||
"honoka-chan/internal/router"
|
||||
"honoka-chan/internal/session"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -24,7 +25,7 @@ func favoriteAccessory(ctx *gin.Context) {
|
||||
ss.Respond(SetResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -48,7 +49,7 @@ func removableSkillEquipment(ctx *gin.Context) {
|
||||
ss.Respond(unitschema.RemovableSkillEquipmentResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -90,7 +91,7 @@ func sale(ctx *gin.Context) {
|
||||
ServerTimestamp: time.Now().Unix(),
|
||||
},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
unitschema "honoka-chan/internal/schema/unit"
|
||||
"honoka-chan/internal/session"
|
||||
honokautils "honoka-chan/internal/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -33,7 +34,7 @@ func setDisplayRank(ctx *gin.Context) {
|
||||
ss.Respond(unitschema.SetDisplayRankResp{
|
||||
ResponseData: []any{},
|
||||
ReleaseInfo: []any{},
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user