Files
honoka-chan/internal/handler/personalnotice/get.go
T
YumeMichi 150ce674ad Implement more endpoints & overhaul [2/n]
Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00

36 lines
746 B
Go

package personalnotice
import (
"honoka-chan/internal/middleware"
"honoka-chan/internal/router"
personalnoticeschema "honoka-chan/internal/schema/personalnotice"
"honoka-chan/internal/session"
"time"
"github.com/gin-gonic/gin"
)
func get(ctx *gin.Context) {
ss := session.Get(ctx)
defer ss.Finalize()
noticeResp := personalnoticeschema.GetResp{
ResponseData: personalnoticeschema.GetData{
HasNotice: false,
NoticeID: 0,
Type: 0,
Title: "",
Contents: "",
ServerTimestamp: time.Now().Unix(),
},
ReleaseInfo: []any{},
StatusCode: 200,
}
ss.Respond(noticeResp)
}
func init() {
router.AddHandler("main.php", "POST", "/personalnotice/get", middleware.Common, get)
}