change error output of startnewevent

This commit is contained in:
Adrian Zürcher
2025-11-01 23:22:46 +01:00
parent ec77c8a488
commit 25f744b26c

View File

@@ -25,8 +25,7 @@ func (a *APIHandler) StartNewEvent(c *gin.Context) {
if err := a.DbHandler.StartNewEvent(name); err != nil { if err := a.DbHandler.StartNewEvent(name); err != nil {
a.logger.Error("StartNewEvent", err) a.logger.Error("StartNewEvent", err)
c.JSON(http.StatusBadRequest, gin.H{"message": err.Error()})
c.JSON(http.StatusInternalServerError, nil)
return return
} }