Compare commits

...

3 Commits

Author SHA1 Message Date
944e1841bb
remove set session on read entry 2024-12-06 16:18:27 +03:00
b072c1314b
set session on read entry 2024-12-06 15:57:22 +03:00
bab4a17bf2
remove setsession on userstore 2024-12-06 12:39:46 +03:00

View File

@ -19,7 +19,6 @@ 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.SetPrefix(db.DATATYPE_USERDATA) store.SetPrefix(db.DATATYPE_USERDATA)
store.SetSession(sessionId)
k := PackKey(typ, []byte(sessionId)) k := PackKey(typ, []byte(sessionId))
return store.Get(ctx, k) return store.Get(ctx, k)
} }
@ -28,7 +27,6 @@ func (store *UserDataStore) ReadEntry(ctx context.Context, sessionId string, typ
// BUG: this uses sessionId twice // BUG: this uses sessionId twice
func (store *UserDataStore) WriteEntry(ctx context.Context, sessionId string, typ DataTyp, value []byte) error { func (store *UserDataStore) WriteEntry(ctx context.Context, sessionId string, typ DataTyp, value []byte) error {
store.SetPrefix(db.DATATYPE_USERDATA) store.SetPrefix(db.DATATYPE_USERDATA)
store.SetSession(sessionId)
k := PackKey(typ, []byte(sessionId)) k := PackKey(typ, []byte(sessionId))
return store.Put(ctx, k, value) return store.Put(ctx, k, value)
} }