mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 12:19:14 +02:00
feat:#150 added slog for more functions and improved return signature
This commit is contained in:
@@ -49,7 +49,11 @@ func AddRoutes(app *pocketbase.PocketBase) {
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/fetch/groups",
|
||||
Handler: func(c echo.Context) error {
|
||||
return v1.SeminarGroups(c, app)
|
||||
groups, err := v1.FetchSeminarGroups(app)
|
||||
if err != nil {
|
||||
return c.JSON(http.StatusInternalServerError, "Failed to fetch seminar groups")
|
||||
}
|
||||
return c.JSON(http.StatusOK, groups)
|
||||
},
|
||||
Middlewares: []echo.MiddlewareFunc{
|
||||
apis.ActivityLogger(app),
|
||||
|
Reference in New Issue
Block a user