set session on read entry

This commit is contained in:
Carlosokumu 2024-12-06 15:57:22 +03:00
parent bab4a17bf2
commit b072c1314b
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -18,6 +18,7 @@ type UserDataStore struct {
// ReadEntry retrieves an entry to the userdata store. // ReadEntry retrieves an entry to the userdata store.
func (store *UserDataStore) ReadEntry(ctx context.Context, sessionId string, typ DataTyp) ([]byte, error) { func (store *UserDataStore) ReadEntry(ctx context.Context, sessionId string, typ DataTyp) ([]byte, error) {
store.SetSession(sessionId)
store.SetPrefix(db.DATATYPE_USERDATA) store.SetPrefix(db.DATATYPE_USERDATA)
k := PackKey(typ, []byte(sessionId)) k := PackKey(typ, []byte(sessionId))
return store.Get(ctx, k) return store.Get(ctx, k)