Separate subprefix db export

This commit is contained in:
lash 2024-11-02 23:41:08 +00:00
parent 1d77ad98dc
commit dae12ac498
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -2,12 +2,14 @@ package common
import ( import (
"git.defalsify.org/vise.git/db" "git.defalsify.org/vise.git/db"
"git.grassecon.net/urdt/ussd/internal/storage"
) )
func StoreToDb(store *UserDataStore, prefix []byte) db.Db { func StoreToDb(store *UserDataStore) db.Db {
innerStore := store.Db return store.Db
if pfx != nil { }
innerStore = NewSubPrefixDb(innerStore, pfx)
} func StoreToPrefixDb(store *UserDataStore, pfx []byte) storage.PrefixDb {
return innerStore return storage.NewSubPrefixDb(store.Db, pfx)
} }