mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 04:09:15 +02:00
fix:#36 fixed tests, naming, and removed old duplicated code
This commit is contained in:
@@ -18,6 +18,7 @@ package db
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/google/uuid"
|
||||
"github.com/pocketbase/pocketbase/daos"
|
||||
"github.com/pocketbase/pocketbase/tools/types"
|
||||
"htwkalender/data-manager/model"
|
||||
@@ -138,11 +139,11 @@ func buildIcalQueryForModules(modulesUuid []string) dbx.Expression {
|
||||
// following the pattern of only containing alphanumeric characters and dashes
|
||||
|
||||
for _, moduleUuid := range modulesUuid {
|
||||
if !IsSafeIdentifier(moduleUuid) {
|
||||
err := uuid.Validate(moduleUuid)
|
||||
if err != nil {
|
||||
slog.Warn("Module UUID is not safe: ", "moduleUuid", moduleUuid)
|
||||
return dbx.HashExp{}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// build where conditions for each module
|
||||
|
Reference in New Issue
Block a user