Audit fixes
This commit is contained in:
1 parent
32b8b0dc89
commit
d8c2990ffd
1 file changed
+4
-1
+4
-1
@@ -27,7 +27,8 @@ type API struct {
|
||||
}
|
||||
|
||||
func New(dbPath string) (*API, error) {
|
||||
sqlDB, err := sql.Open("sqlite3", dbPath+"?_journal=WAL&_foreign_keys=on")
|
||||
dbPath += "?_journal=WAL&_foreign_keys=on&_busy_timeout=5000&_txlock=immediate"
|
||||
sqlDB, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -79,6 +80,8 @@ func (a *API) Config_Get() (*Config, error) {
|
||||
}
|
||||
|
||||
func (a *API) Config_Update(conf *Config) error {
|
||||
a.sessionsMu.Lock()
|
||||
defer a.sessionsMu.Unlock()
|
||||
return errs.DB(db.Config_Update(a.db, conf))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user