Files
arbeitszeitmessung/Backend/models/database.go
Tom Tröger ba034f1c33
Some checks failed
Tests / Run Go Tests (push) Failing after 1m35s
Arbeitszeitmessung Deploy / Build Webserver (push) Successful in 2m48s
feat: updated docs and added description to files
2026-01-29 18:28:28 +01:00

19 lines
440 B
Go

package models
// this file is only used as cache for the diffenrent absence and booking types,
// in the future this should be two chaching variables each in their own place
import (
"arbeitszeitmessung/helper"
)
var definedTypes = helper.NewCache(3600, func(key string) (any, error) {
switch key {
case "s_abwesenheit_typen":
return GetAbsenceTypes()
case "s_anwesenheit_typen":
return GetBookingTypes()
}
return nil, nil
})