fix:#150 fixed return

This commit is contained in:
Elmar Kresse
2024-01-21 18:51:02 +01:00
parent fbf99de175
commit 32c6f962d5
2 changed files with 10 additions and 4 deletions

View File

@@ -23,18 +23,22 @@ func GetRooms(app *pocketbase.PocketBase) ([]string, error) {
return nil, err
}
roomArray := clearAndSeparateRooms([]struct {
roomArray, err := clearAndSeparateRooms([]struct {
Rooms string
Course string
}(events))
return roomArray
if err != nil {
return nil, err
}
return roomArray, nil
}
func clearAndSeparateRooms(events []struct {
Rooms string
Course string
}) []string {
}) ([]string, error) {
var roomArray []string
for _, event := range events {