From 4ecfc9de38ac602a632eaab4b95010ea1f72d47d Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Wed, 4 Dec 2024 20:38:52 +0300 Subject: [PATCH] removed DATATYPE_USERSUB and replaced with DATATYPE_USERDATA --- internal/storage/db.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/storage/db.go b/internal/storage/db.go index 8c9ff35..457af78 100644 --- a/internal/storage/db.go +++ b/internal/storage/db.go @@ -6,10 +6,6 @@ import ( "git.defalsify.org/vise.git/db" ) -const ( - DATATYPE_USERSUB = 64 -) - // PrefixDb interface abstracts the database operations. type PrefixDb interface { Get(ctx context.Context, key []byte) ([]byte, error) @@ -35,13 +31,13 @@ func (s *SubPrefixDb) toKey(k []byte) []byte { } func (s *SubPrefixDb) Get(ctx context.Context, key []byte) ([]byte, error) { - s.store.SetPrefix(DATATYPE_USERSUB) + s.store.SetPrefix(db.DATATYPE_USERDATA) key = s.toKey(key) return s.store.Get(ctx, key) } func (s *SubPrefixDb) Put(ctx context.Context, key []byte, val []byte) error { - s.store.SetPrefix(DATATYPE_USERSUB) + s.store.SetPrefix(db.DATATYPE_USERDATA) key = s.toKey(key) return s.store.Put(ctx, key, val) }