mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-10 21:53:51 +02:00
feat:#39 added fetcher for Events
This commit is contained in:
@@ -69,10 +69,11 @@ func AddRoutes(app *pocketbase.PocketBase) {
|
||||
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
|
||||
_, err := e.Router.AddRoute(echo.Route{
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/fetch/v3/groups",
|
||||
Path: "/api/fetch/v3",
|
||||
Handler: func(c echo.Context) error {
|
||||
groups, err := v3.FetchSeminarGroups(app)
|
||||
groups, err := v3.FetchAllResources(app)
|
||||
if err != nil {
|
||||
slog.Error("Failed to fetch seminar groups: %v", err)
|
||||
return c.JSON(http.StatusBadRequest, "Failed to fetch seminar groups")
|
||||
}
|
||||
return c.JSON(http.StatusOK, groups)
|
||||
|
Reference in New Issue
Block a user