public static async Task <List <PostQueryDTO> > GetFeed(string userId, long fromTime = 0, long continuationTime = 0)
        {
            // select
            var sqlString = $"SELECT TOP 30 p.id, p.post_id, p.tags, p.track_id, p.track_name, p.date_created, p.type, p.has_image, p.title, p.summary, p.url FROM p";

            // where user id
            sqlString += $" WHERE ARRAY_CONTAINS(p.subscriber_list, \"{userId}\")";

            // continuation or fromTime
            if (fromTime != 0)
            {
                sqlString += $" and p.date_created > {fromTime}";
            }
            else if (continuationTime != 0)
            {
                sqlString += $" and p.date_created < {continuationTime}";
            }


            // chronological
            sqlString += " ORDER BY p.date_created DESC";

            List <PostCosmos> posts = await CosmosRepository <PostCosmos> .GetItemsSqlAsync(sqlString);

            return(ConvertCosmosResultToQueryDTO(posts));
        }
        // TODO: fix query posts
        public static async Task <PostReturnObject> QueryPosts(PostQuery query)
        {
            List <PostQueryDTO> data = await CosmosRepository <PostQueryDTO> .GetItemsSqlAsync(query.sql);

            string continuation = data.Count > 1 ? data[data.Count - 1].date_created.ToString() : null;

            return(new PostReturnObject()
            {
                continuation = continuation,
                count = data.Count,
                data = data
            });
        }