Move response files to specific directory
Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
-5419
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -752,7 +752,7 @@ func Api(ctx *gin.Context) {
|
||||
CheckErr(err)
|
||||
case "stamp":
|
||||
// key = "stamp_result"
|
||||
stampResp := utils.ReadAllText("assets/stamp.json")
|
||||
stampResp := utils.ReadAllText("assets/sif/stamp.json")
|
||||
var mStampResp interface{}
|
||||
err = json.Unmarshal([]byte(stampResp), &mStampResp)
|
||||
CheckErr(err)
|
||||
@@ -806,7 +806,7 @@ func Api(ctx *gin.Context) {
|
||||
CheckErr(err)
|
||||
case "item":
|
||||
// key = "item_list_result"
|
||||
itemResp := utils.ReadAllText("assets/item.json")
|
||||
itemResp := utils.ReadAllText("assets/sif/item.json")
|
||||
var mItemResp interface{}
|
||||
err = json.Unmarshal([]byte(itemResp), &mItemResp)
|
||||
CheckErr(err)
|
||||
@@ -898,7 +898,7 @@ func Api(ctx *gin.Context) {
|
||||
} else if v.Action == "cardRanking" {
|
||||
// key = "profile_card_ranking_result"
|
||||
var result []interface{}
|
||||
love := utils.ReadAllText("assets/love.json")
|
||||
love := utils.ReadAllText("assets/sif/love.json")
|
||||
err := json.Unmarshal([]byte(love), &result)
|
||||
CheckErr(err)
|
||||
loveResp := model.LoveResp{
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func PartyList(ctx *gin.Context) {
|
||||
resp := utils.ReadAllText("assets/partylist.json")
|
||||
resp := utils.ReadAllText("assets/sif/partylist.json")
|
||||
|
||||
nonce := ctx.GetInt("nonce")
|
||||
nonce++
|
||||
@@ -298,7 +298,7 @@ func PlayLive(ctx *gin.Context) {
|
||||
// 好友主唱技能加成
|
||||
// TODO 好友支援存入数据库
|
||||
var tomoUnitId int64
|
||||
partyList := gjson.Parse(utils.ReadAllText("assets/partylist.json")).Get("response_data.party_list")
|
||||
partyList := gjson.Parse(utils.ReadAllText("assets/sif/partylist.json")).Get("response_data.party_list")
|
||||
partyList.ForEach(func(key, value gjson.Result) bool {
|
||||
if value.Get("user_info.user_id").Int() == playReq.PartyUserID {
|
||||
tomoUnitId = value.Get("center_unit_info.unit_id").Int()
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ func ScenarioStartup(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
func ScenarioReward(ctx *gin.Context) {
|
||||
resp := utils.ReadAllText("assets/reward.json")
|
||||
resp := utils.ReadAllText("assets/sif/reward.json")
|
||||
|
||||
nonce := ctx.GetInt("nonce")
|
||||
nonce++
|
||||
|
||||
@@ -41,7 +41,7 @@ func SubScenarioStartup(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
func SubScenarioReward(ctx *gin.Context) {
|
||||
resp := utils.ReadAllText("assets/subreward.json")
|
||||
resp := utils.ReadAllText("assets/sif/subreward.json")
|
||||
|
||||
nonce := ctx.GetInt("nonce")
|
||||
nonce++
|
||||
|
||||
+20
-20
@@ -182,26 +182,26 @@ func AsRouter(r *gin.Engine) {
|
||||
newKey := utils.SliceXor(randomBytes, []byte(sessionKey))
|
||||
newKey64 := base64.StdEncoding.EncodeToString(newKey)
|
||||
|
||||
loginBody := strings.ReplaceAll(utils.ReadAllText("assets/login.json"), "SESSION_KEY", newKey64)
|
||||
loginBody := strings.ReplaceAll(utils.ReadAllText("assets/as/login.json"), "SESSION_KEY", newKey64)
|
||||
resp := SignResp(ctx.GetString("ep"), loginBody, config.StartUpKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/bootstrap/fetchBootstrap", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/bootstrap.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchBootstrap.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/billing/fetchBillingHistory", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/billing.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchBillingHistory.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/notice/fetchNotice", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/notice.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchNotice.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
@@ -231,12 +231,12 @@ func AsRouter(r *gin.Engine) {
|
||||
packageList := []string{}
|
||||
urlList := []string{}
|
||||
|
||||
err = json.Unmarshal([]byte(utils.ReadAllText("assets/packages.json")), &packageList)
|
||||
err = json.Unmarshal([]byte(utils.ReadAllText("assets/as/packages.json")), &packageList)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = json.Unmarshal([]byte(utils.ReadAllText("assets/urls.json")), &urlList)
|
||||
err = json.Unmarshal([]byte(utils.ReadAllText("assets/as/urls.json")), &urlList)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -297,25 +297,25 @@ func AsRouter(r *gin.Engine) {
|
||||
ctx.String(http.StatusOK, string(mm))
|
||||
})
|
||||
s.POST("/card/updateCardNewFlag", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/updateCardNewFlag.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/updateCardNewFlag.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/bootstrap/getClearedPlatformAchievement", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/getClearedPlatformAchievement.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/getClearedPlatformAchievement.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/live/fetchLiveMusicSelect", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/fetchLiveMusicSelect.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchLiveMusicSelect.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/liveMv/start", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/liveMvStart.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/liveMvStart.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
@@ -541,14 +541,14 @@ func AsRouter(r *gin.Engine) {
|
||||
return true
|
||||
})
|
||||
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/fetchCommunicationMemberDetail.json"), `"MEMBER_ID"`, memberId)
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/as/fetchCommunicationMemberDetail.json"), `"MEMBER_ID"`, memberId)
|
||||
resp := SignResp(ctx.GetString("ep"), signBody, sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/navi/tapLovePoint", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/tapLovePoint.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/tapLovePoint.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
@@ -564,26 +564,26 @@ func AsRouter(r *gin.Engine) {
|
||||
return true
|
||||
})
|
||||
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/updateUserCommunicationMemberDetailBadge.json"), `"MEMBER_MASTER_ID"`, memberMasterId)
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/as/updateUserCommunicationMemberDetailBadge.json"), `"MEMBER_MASTER_ID"`, memberMasterId)
|
||||
resp := SignResp(ctx.GetString("ep"), signBody, sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/communicationMember/updateUserLiveDifficultyNewFlag", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/updateUserLiveDifficultyNewFlag.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/updateUserLiveDifficultyNewFlag.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/communicationMember/finishUserStorySide", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/finishUserStorySide.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/finishUserStorySide.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/communicationMember/finishUserStoryMember", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/finishUserStoryMember.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/finishUserStoryMember.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
@@ -601,7 +601,7 @@ func AsRouter(r *gin.Engine) {
|
||||
return true
|
||||
})
|
||||
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/setTheme.json"), `"MEMBER_MASTER_ID"`, memberMasterId)
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/as/setTheme.json"), `"MEMBER_MASTER_ID"`, memberMasterId)
|
||||
signBody = strings.ReplaceAll(signBody, `"BACKGROUND_MASTER_ID"`, backgroundMasterId)
|
||||
signBody = strings.ReplaceAll(signBody, `"SUIT_MASTER_ID"`, suitMasterId)
|
||||
resp := SignResp(ctx.GetString("ep"), signBody, sessionKey)
|
||||
@@ -610,13 +610,13 @@ func AsRouter(r *gin.Engine) {
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/userProfile/fetchProfile", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/fetchProfile.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchProfile.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/emblem/fetchEmblem", func(ctx *gin.Context) {
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/fetchEmblem.json"), sessionKey)
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/fetchEmblem.json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
@@ -631,7 +631,7 @@ func AsRouter(r *gin.Engine) {
|
||||
}
|
||||
return true
|
||||
})
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/activateEmblem.json"), `"EMBLEM_ID"`, emblemId)
|
||||
signBody := strings.ReplaceAll(utils.ReadAllText("assets/as/activateEmblem.json"), `"EMBLEM_ID"`, emblemId)
|
||||
resp := SignResp(ctx.GetString("ep"), signBody, sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
|
||||
Reference in New Issue
Block a user