Skip to content

Commit

Permalink
Removed break from switch
Browse files Browse the repository at this point in the history
  • Loading branch information
SebiWrn committed Sep 11, 2024
1 parent 561a0f4 commit 4e3b468
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions web/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,18 @@ func (r mainRoutes) AdminPage(c *gin.Context) {
} else {
notifications = found
}
break
case "token":
tokens, err = r.TokenDao.GetAllTokens()
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
logger.Error("couldn't query tokens", "err", err)
c.AbortWithStatus(http.StatusInternalServerError)
}
break
case "info-pages":
infopages, err = r.InfoPageDao.GetAll()
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
logger.Error("couldn't query texts", "err", err)
c.AbortWithStatus(http.StatusInternalServerError)
}
break
case "serverStats":
streams, err := r.StreamsDao.GetAllStreams()
if err != nil {
Expand All @@ -83,14 +80,12 @@ func (r mainRoutes) AdminPage(c *gin.Context) {
Model: gorm.Model{ID: 0},
Streams: streams,
}
break
case "serverNotifications":
if res, err := r.ServerNotificationDao.GetAllServerNotifications(); err == nil {
serverNotifications = res
} else {
logger.Warn("could not get all server notifications", "err", err)
}
break
}
semesters := r.CoursesDao.GetAvailableSemesters(c)
y, t := tum.GetCurrentSemester()
Expand Down

0 comments on commit 4e3b468

Please sign in to comment.