change error output of startnewevent
This commit is contained in:
@@ -25,8 +25,7 @@ func (a *APIHandler) StartNewEvent(c *gin.Context) {
|
||||
|
||||
if err := a.DbHandler.StartNewEvent(name); err != nil {
|
||||
a.logger.Error("StartNewEvent", err)
|
||||
|
||||
c.JSON(http.StatusInternalServerError, nil)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"message": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user