remove setsession on userstore #204

Closed
carlos wants to merge 3 commits from double-session-id into master
Showing only changes of commit bab4a17bf2 - Show all commits

View File

@ -19,7 +19,6 @@ type UserDataStore struct {
// ReadEntry retrieves an entry to the userdata store.
func (store *UserDataStore) ReadEntry(ctx context.Context, sessionId string, typ DataTyp) ([]byte, error) {
store.SetPrefix(db.DATATYPE_USERDATA)
store.SetSession(sessionId)
k := PackKey(typ, []byte(sessionId))
return store.Get(ctx, k)
}
@ -28,7 +27,6 @@ func (store *UserDataStore) ReadEntry(ctx context.Context, sessionId string, typ
// BUG: this uses sessionId twice
func (store *UserDataStore) WriteEntry(ctx context.Context, sessionId string, typ DataTyp, value []byte) error {
store.SetPrefix(db.DATATYPE_USERDATA)
store.SetSession(sessionId)
k := PackKey(typ, []byte(sessionId))
return store.Put(ctx, k, value)
}