changed module model and fixed empty name in event while fetch

This commit is contained in:
Elmar Kresse
2023-09-30 21:44:43 +02:00
parent 86f2636681
commit b1927864c2
5 changed files with 31 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ package events
import (
"github.com/labstack/echo/v5"
"github.com/pocketbase/pocketbase"
"htwkalender/model"
"htwkalender/service/db"
"htwkalender/service/functions"
)
@@ -28,10 +29,7 @@ func replaceEmptyEntryInStringArray(modules []string, replacement string) {
}
}
func replaceEmptyEntry(modules []struct {
Name string
Course string
}, replacement string) {
func replaceEmptyEntry(modules model.Events, replacement string) {
//replace empty functions with "Sonderveranstaltungen"
for i, module := range modules {
if functions.OnlyWhitespace(module.Name) {