From dc622a7b5b9fefe18750821663fc9e0a62fccd68 Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Wed, 23 Jun 2021 18:22:01 +0500 Subject: [PATCH] fetching drafts using ecency api --- src/providers/ecency/ecency.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/providers/ecency/ecency.js b/src/providers/ecency/ecency.js index 95fd6f182..685e6e593 100644 --- a/src/providers/ecency/ecency.js +++ b/src/providers/ecency/ecency.js @@ -3,7 +3,6 @@ import ecencyApi from '../../config/ecencyApi'; import searchApi from '../../config/search'; import { upload } from '../../config/imageApi'; import serverList from '../../config/serverListApi'; -import { jsonStringify } from '../../utils/jsonUtils'; import bugsnag from '../../config/bugsnag'; import { SERVER_LIST } from '../../constants/options/api'; import { parsePost } from '../../utils/postParser'; @@ -31,10 +30,13 @@ export const getCurrencyTokenRate = (currency, token) => * @params username */ export const getDrafts = (username) => - api - .get(`/drafts/${username}`) + ecencyApi + .post('/private-api/drafts') .then((resp) => resp.data) - .catch((error) => bugsnag.notify(error)); + .catch((error) => { + bugsnag.notify(error); + reject(error); + }); /*export const getDrafts = data => new Promise((resolve, reject) => {