diff --git a/pkg/db/business_impl.go b/pkg/db/business_impl.go index 9b49e9fc..15d70325 100644 --- a/pkg/db/business_impl.go +++ b/pkg/db/business_impl.go @@ -604,7 +604,7 @@ func (impl *BusinessStoreImpl) retrieveUser(ctx context.Context, userID int32) ( } if impl.querier != nil { - reader.QueryKeyFunc = queryKeyInt + reader.QueryKeyFunc = QueryKeyInt reader.QueryFunc = impl.querier.GetUserByID } @@ -788,7 +788,7 @@ func (impl *BusinessStoreImpl) RetrieveSubscription(ctx context.Context, sID int } if impl.querier != nil { - reader.QueryKeyFunc = queryKeyInt + reader.QueryKeyFunc = QueryKeyInt reader.QueryFunc = impl.querier.GetSubscriptionByID } @@ -1001,7 +1001,7 @@ func (impl *BusinessStoreImpl) RetrieveOrganizationUsers(ctx context.Context, or } if impl.querier != nil { - reader.QueryKeyFunc = queryKeyInt + reader.QueryKeyFunc = QueryKeyInt reader.QueryFunc = impl.querier.GetOrganizationUsers } @@ -1592,7 +1592,7 @@ func (impl *BusinessStoreImpl) RetrieveSystemNotification(ctx context.Context, i } if impl.querier != nil { - reader.QueryKeyFunc = queryKeyInt + reader.QueryKeyFunc = QueryKeyInt reader.QueryFunc = impl.querier.GetSystemNotificationById } diff --git a/pkg/db/utils.go b/pkg/db/utils.go index c5aedda8..e62bfa86 100644 --- a/pkg/db/utils.go +++ b/pkg/db/utils.go @@ -179,7 +179,7 @@ func FetchCachedArray[T any](ctx context.Context, cache common.Cache[CacheKey, a return nil, errInvalidCacheType } -func queryKeyInt(ck CacheKey) (int32, error) { +func QueryKeyInt(ck CacheKey) (int32, error) { return ck.IntValue, nil }