Expose subprefix db

This commit is contained in:
lash 2024-11-02 23:33:52 +00:00
parent 3a8a5f40ba
commit 1d77ad98dc
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

13
common/storage.go Normal file
View File

@ -0,0 +1,13 @@
package common
import (
"git.defalsify.org/vise.git/db"
)
func StoreToDb(store *UserDataStore, prefix []byte) db.Db {
innerStore := store.Db
if pfx != nil {
innerStore = NewSubPrefixDb(innerStore, pfx)
}
return innerStore
}