diff options
Diffstat (limited to 'modules/system/db.go')
-rw-r--r-- | modules/system/db.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/system/db.go b/modules/system/db.go index 3f2e4c59bb..05e9de0ae8 100644 --- a/modules/system/db.go +++ b/modules/system/db.go @@ -4,6 +4,8 @@ package system import ( + "context" + "code.gitea.io/gitea/models/system" "code.gitea.io/gitea/modules/json" @@ -14,8 +16,8 @@ import ( type DBStore struct{} // Get reads the state item -func (f *DBStore) Get(item StateItem) error { - content, err := system.GetAppStateContent(item.Name()) +func (f *DBStore) Get(ctx context.Context, item StateItem) error { + content, err := system.GetAppStateContent(ctx, item.Name()) if err != nil { return err } @@ -26,10 +28,10 @@ func (f *DBStore) Get(item StateItem) error { } // Set saves the state item -func (f *DBStore) Set(item StateItem) error { +func (f *DBStore) Set(ctx context.Context, item StateItem) error { b, err := json.Marshal(item) if err != nil { return err } - return system.SaveAppStateContent(item.Name(), util.BytesToReadOnlyString(b)) + return system.SaveAppStateContent(ctx, item.Name(), util.BytesToReadOnlyString(b)) } |