update fetch and fixed bug

This commit is contained in:
masterelmar
2023-08-23 19:16:23 +02:00
parent 72382a3c6a
commit 0686b9397f
8 changed files with 399 additions and 66 deletions

13
service/roomService.go Normal file
View File

@@ -0,0 +1,13 @@
package service
import (
"github.com/labstack/echo/v5"
"github.com/pocketbase/pocketbase"
"htwk-planner/service/db"
"net/http"
)
func GetRooms(c echo.Context, app *pocketbase.PocketBase) error {
rooms := db.GetRooms(app)
return c.JSON(http.StatusOK, rooms)
}