feat: add object storage and points leaderboard
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package store
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Store) UploadConfigValues(ctx context.Context) (map[string]string, error) {
|
||||
rows, err := s.db.QueryContext(ctx, "SELECT `key`, `value` FROM hg_sys_config WHERE `group`='upload' AND status=1")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
values := make(map[string]string)
|
||||
for rows.Next() {
|
||||
var key, value string
|
||||
if err = rows.Scan(&key, &value); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
values[key] = value
|
||||
}
|
||||
return values, rows.Err()
|
||||
}
|
||||
Reference in New Issue
Block a user