mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-07 04:09:17 +02:00
feat:#16 added uuid for all modules in back-/frontend
This commit is contained in:
@@ -12,16 +12,10 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
)
|
||||
|
||||
func AddRoutes(app *pocketbase.PocketBase) {
|
||||
|
||||
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
|
||||
e.Router.GET("/*", apis.StaticDirectoryHandler(os.DirFS("./pb_public"), false))
|
||||
return nil
|
||||
})
|
||||
|
||||
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
|
||||
_, err := e.Router.AddRoute(echo.Route{
|
||||
Method: http.MethodGet,
|
||||
@@ -249,8 +243,13 @@ func AddRoutes(app *pocketbase.PocketBase) {
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/feed/migrate",
|
||||
Handler: func(c echo.Context) error {
|
||||
ical.MigrateFeedJson(app)
|
||||
return c.JSON(200, "Migrated")
|
||||
err := ical.MigrateFeedJson(app)
|
||||
|
||||
if err != nil {
|
||||
return c.JSON(500, err)
|
||||
} else {
|
||||
return c.JSON(200, "Migrated")
|
||||
}
|
||||
},
|
||||
Middlewares: []echo.MiddlewareFunc{
|
||||
apis.ActivityLogger(app),
|
||||
|
Reference in New Issue
Block a user