fix:#75 added hash function to dbEventService

This commit is contained in:
Elmar Kresse
2025-04-27 13:57:34 +02:00
parent 57c2fcb7ad
commit 0d0943935d
2 changed files with 9 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/tools/types"
"htwkalender/data-manager/model"
"htwkalender/data-manager/service/functions"
"log/slog"
"time"
@@ -197,7 +198,7 @@ func NewEvent(collection *core.Collection, event model.Event) (*Event, error) {
ev.SetCompulsory(event.Compulsory)
if event.UUID == "" {
event.UUID = uuid.NewString()
event.UUID = functions.GenerateUUID(event)
}
ev.SetUUID(event.UUID)
return ev, nil