Move response files to specific directory
Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
+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++
|
||||
|
||||
Reference in New Issue
Block a user