mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 19:31:54 +03:00
fetching drafts using ecency api
This commit is contained in:
parent
039e90b769
commit
dc622a7b5b
@ -3,7 +3,6 @@ import ecencyApi from '../../config/ecencyApi';
|
|||||||
import searchApi from '../../config/search';
|
import searchApi from '../../config/search';
|
||||||
import { upload } from '../../config/imageApi';
|
import { upload } from '../../config/imageApi';
|
||||||
import serverList from '../../config/serverListApi';
|
import serverList from '../../config/serverListApi';
|
||||||
import { jsonStringify } from '../../utils/jsonUtils';
|
|
||||||
import bugsnag from '../../config/bugsnag';
|
import bugsnag from '../../config/bugsnag';
|
||||||
import { SERVER_LIST } from '../../constants/options/api';
|
import { SERVER_LIST } from '../../constants/options/api';
|
||||||
import { parsePost } from '../../utils/postParser';
|
import { parsePost } from '../../utils/postParser';
|
||||||
@ -31,10 +30,13 @@ export const getCurrencyTokenRate = (currency, token) =>
|
|||||||
* @params username
|
* @params username
|
||||||
*/
|
*/
|
||||||
export const getDrafts = (username) =>
|
export const getDrafts = (username) =>
|
||||||
api
|
ecencyApi
|
||||||
.get(`/drafts/${username}`)
|
.post('/private-api/drafts')
|
||||||
.then((resp) => resp.data)
|
.then((resp) => resp.data)
|
||||||
.catch((error) => bugsnag.notify(error));
|
.catch((error) => {
|
||||||
|
bugsnag.notify(error);
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
/*export const getDrafts = data =>
|
/*export const getDrafts = data =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user