master
Evan Chen 2021-12-19 02:01:56 +08:00
parent 2de0509b26
commit fee62350bd
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,10 @@ func Init() error {
} }
func Add(Key, Description, Default string) error { func Add(Key, Description, Default string) error {
result := store.DB.Exec(`select "value" from "attributes" where "key" = ?`, Key)
if result.RowsAffected != 0 {
return nil
}
a := &Attribute{ a := &Attribute{
Key: Key, Key: Key,
Description: Description, Description: Description,