mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 05:42:33 +03:00
added some log statement in dhive calls
This commit is contained in:
parent
9d6b80480b
commit
25d5de09ff
@ -301,6 +301,7 @@ export const getCommunities = async (
|
||||
) =>
|
||||
new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
console.log("Getting communities", query)
|
||||
const data = await client.call('bridge', 'list_communities', {
|
||||
last,
|
||||
limit,
|
||||
@ -440,6 +441,7 @@ export const ignoreUser = async (currentAccount, pin, data) => {
|
||||
export const getActiveVotes = (author, permlink) =>
|
||||
new Promise((resolve, reject) => {
|
||||
try {
|
||||
console.log("Getting active votes", author, permlink)
|
||||
client
|
||||
.call('condenser_api', 'get_active_votes', [author, permlink])
|
||||
.then((result) => {
|
||||
@ -455,6 +457,7 @@ export const getActiveVotes = (author, permlink) =>
|
||||
|
||||
export const getRankedPosts = async (query, currentUserName, filterNsfw) => {
|
||||
try {
|
||||
console.log("Getting ranked posts:", query)
|
||||
let posts = await client.call('bridge', 'get_ranked_posts', query);
|
||||
|
||||
if (posts) {
|
||||
@ -465,6 +468,7 @@ export const getRankedPosts = async (query, currentUserName, filterNsfw) => {
|
||||
return updatedPosts;
|
||||
}
|
||||
}
|
||||
console.log("Returning fetched posts: " + posts?posts.length:null)
|
||||
return posts;
|
||||
} catch (error) {
|
||||
return error;
|
||||
@ -473,6 +477,7 @@ export const getRankedPosts = async (query, currentUserName, filterNsfw) => {
|
||||
|
||||
export const getAccountPosts = async (query, currentUserName, filterNsfw) => {
|
||||
try {
|
||||
console.log("Getting account posts: ", query)
|
||||
let posts = await client.call('bridge', 'get_account_posts', query);
|
||||
|
||||
if (posts) {
|
||||
@ -483,6 +488,7 @@ export const getAccountPosts = async (query, currentUserName, filterNsfw) => {
|
||||
return updatedPosts;
|
||||
}
|
||||
}
|
||||
console.log("Returning fetched posts: " + posts?posts.length:null)
|
||||
return posts;
|
||||
} catch (error) {
|
||||
return error;
|
||||
@ -491,6 +497,7 @@ export const getAccountPosts = async (query, currentUserName, filterNsfw) => {
|
||||
|
||||
export const getRepliesByLastUpdate = async (query) => {
|
||||
try {
|
||||
console.log("Getting replies: ", query)
|
||||
const replies = await client.database.call('get_replies_by_last_update', [
|
||||
query.start_author,
|
||||
query.start_permlink,
|
||||
@ -504,7 +511,9 @@ export const getRepliesByLastUpdate = async (query) => {
|
||||
};
|
||||
|
||||
export const getPost = async (author, permlink, currentUserName = null, isPromoted = false) => {
|
||||
|
||||
try {
|
||||
console.log("Getting post: ", author, permlink)
|
||||
const post = await client.database.call('get_content', [author, permlink]);
|
||||
|
||||
return post ? parsePost(post, currentUserName, isPromoted) : null;
|
||||
|
Loading…
Reference in New Issue
Block a user