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