refactor: use atomic renames for uploaded files (#372)

Co-authored-by: Kyle Mendell <kmendell@ofkm.us>
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Alessandro (Ale) Segala
2025-03-23 13:21:44 -07:00
committed by GitHub
parent b8dcda8049
commit 26b2de4f00
4 changed files with 108 additions and 37 deletions

View File

@@ -1,5 +1,9 @@
package model
import (
"strconv"
)
type AppConfigVariable struct {
Key string `gorm:"primaryKey;not null"`
Type string
@@ -9,6 +13,11 @@ type AppConfigVariable struct {
DefaultValue string
}
func (a *AppConfigVariable) IsTrue() bool {
ok, _ := strconv.ParseBool(a.Value)
return ok
}
type AppConfig struct {
// General
AppName AppConfigVariable