This extends 09f0237560.
- Extend user_pref with configurable profile fields and automatic migration defaults
- Move user info responses to read from user_pref instead of hardcoded values
- Add admin profile page for editing UI values after login
Signed-off-by: Sean Du <do4suki@gmail.com>
31 lines
647 B
Go
31 lines
647 B
Go
package live
|
|
|
|
import (
|
|
"honoka-chan/internal/middleware"
|
|
"honoka-chan/internal/router"
|
|
liveschema "honoka-chan/internal/schema/live"
|
|
"honoka-chan/internal/session"
|
|
"time"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func continuee(ctx *gin.Context) {
|
|
ss := session.Get(ctx)
|
|
defer ss.Finalize()
|
|
|
|
ss.Respond(liveschema.ContinueResp{
|
|
ResponseData: liveschema.ContinueData{
|
|
BeforeSnsCoin: ss.UserPref.SnsCoin,
|
|
AfterSnsCoin: ss.UserPref.SnsCoin,
|
|
ServerTimestamp: time.Now().Unix(),
|
|
},
|
|
ReleaseInfo: []any{},
|
|
StatusCode: 200,
|
|
})
|
|
}
|
|
|
|
func init() {
|
|
router.AddHandler("main.php", "POST", "/live/continue", middleware.Common, continuee)
|
|
}
|