- Add special_live_rotation_m data to main.db for rotated special live scheduling - Split normal and special live queries to avoid selecting special-only columns from normal_live_m - Build live schedule/status around rotated special lives and derived training lives - Reuse user training energy values in login top info and live party list responses - Set training energy and max training energy defaults to 999 Signed-off-by: Sean Du <do4suki@gmail.com>
46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package login
|
|
|
|
import (
|
|
loginapischema "honoka-chan/internal/schema/api/login"
|
|
"honoka-chan/internal/session"
|
|
"time"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func loginTopInfoOnce(ctx *gin.Context) (res any, err error) {
|
|
ss := session.Get(ctx)
|
|
userInfo := ss.GetUserInfo()
|
|
|
|
res = loginapischema.TopInfoOnceResp{
|
|
Result: loginapischema.TopInfoOnceData{
|
|
NewAchievementCnt: 0,
|
|
UnaccomplishedAchievementCnt: 0,
|
|
LiveDailyRewardExist: false,
|
|
TrainingEnergy: userInfo.TrainingEnergy,
|
|
TrainingEnergyMax: userInfo.TrainingEnergyMax,
|
|
Notification: loginapischema.Notification{
|
|
Push: false,
|
|
Lp: false,
|
|
UpdateInfo: false,
|
|
Campaign: false,
|
|
Live: false,
|
|
Lbonus: false,
|
|
Event: false,
|
|
Secretbox: false,
|
|
Birthday: ss.UserPref.HasBirthDate(),
|
|
},
|
|
OpenArena: true,
|
|
CostumeStatus: true,
|
|
OpenAccessory: true,
|
|
ArenaSiSkillUniqueCheck: true,
|
|
OpenV98: true,
|
|
},
|
|
Status: 200,
|
|
CommandNum: false,
|
|
TimeStamp: time.Now().Unix(),
|
|
}
|
|
|
|
return res, err
|
|
}
|