mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 17:59:14 +02:00
fix:#150 fixed return
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
Reference in New Issue
Block a user