started work on task assignment table

This commit is contained in:
z1glr
2025-01-11 12:27:41 +00:00
parent 2a746cf76d
commit 4f203704a6
13 changed files with 226 additions and 157 deletions

View File

@@ -9,10 +9,10 @@ import (
)
type User struct {
Name string `db:"text"`
Name string `db:"name"`
Password []byte `db:"password"`
TokenID string `db:"tokenID"`
Admin bool `db:"disabled"`
Admin bool `db:"admin"`
}
var c *cache.Cache
@@ -21,7 +21,7 @@ func Get() (map[string]User, error) {
if users, hit := c.Get("users"); !hit {
refresh()
return nil, fmt.Errorf("users not stored cached")
return nil, fmt.Errorf("users not cached")
} else {
return users.(map[string]User), nil
}