Refactor checkin table to attendance table
Some checks failed
Build Backend (NixCN CMS) TeamCity build failed
Build Frontend (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-01 14:08:59 +08:00
parent acd3c95c80
commit 304e1d95ed
10 changed files with 279 additions and 323 deletions

View File

@@ -8,7 +8,7 @@ import (
)
func Info(c *gin.Context) {
event := new(data.Event)
eventData := new(data.Event)
eventIdOrig, ok := c.GetQuery("event_id")
if !ok {
c.JSON(400, gin.H{
@@ -26,7 +26,7 @@ func Info(c *gin.Context) {
return
}
err = event.GetEventById(eventId)
event, err := eventData.GetEventById(eventId)
if err != nil {
c.JSON(404, gin.H{
"status": "event id not found",
@@ -35,9 +35,8 @@ func Info(c *gin.Context) {
}
c.JSON(200, gin.H{
"name": event.Name,
"start_time": event.StartTime,
"end_time": event.EndTime,
"joined_users": event.JoinedUsers,
"name": event.Name,
"start_time": event.StartTime,
"end_time": event.EndTime,
})
}