forked from urdt/ussd
Expose subprefix db
This commit is contained in:
parent
3a8a5f40ba
commit
1d77ad98dc
13
common/storage.go
Normal file
13
common/storage.go
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user