New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mb/api migration #2723
Mb/api migration #2723
Conversation
src/providers/ecency/ePoint.ts
Outdated
export const gameStatusCheck = async (game_type: string) => { | ||
try { | ||
const data = { game_type }; | ||
const res = await ecencyApi.post('/private-api/get-game', data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data object is being sent as post request body here since request if of type POST, you can either merge params with url path or add them in config as params, that is usually third argument of an axios post method.
src/providers/ecency/ePoint.ts
Outdated
export const gameClaim = async (game_type: string) => { | ||
try { | ||
const data = { game_type }; | ||
const res = await ecencyApi.post('/private-api/get-game', data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same mistake here...{game_type} should be sent as params while {key} should the data passed body
src/providers/ecency/ecency.ts
Outdated
export const addReport = async (type: 'content' | 'user', data: string) => { | ||
try { | ||
const response = await api.post('/report', { | ||
const response = await api.post('/private-api/report', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ecencyApi
instead api
src/providers/ecency/ecency.ts
Outdated
* data:string | ||
* | ||
**/ | ||
export const deleteAccount = async (data: string, username: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- username should be first argument to avoid conflict from previous calls
- use
ecencyApi
insteadapi
src/providers/ecency/ecency.ts
Outdated
// .catch((error) => bugsnagInstance.notify(error)); | ||
|
||
export const purchaseOrder = async (data: PurchaseRequestData, platform: string, product: string, receipt: string, user: string) => { | ||
const orderData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- there is no source to initialise this object,
data
is never used here. - request properties is already a part of
data
passed to method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be merged for now, reverted api endpoint that are not working properly when migration to private-api..
This reverts commit af1552f.
What does this PR?
End points that need to migration
Where should the reviewer start?
Steps to reproduce
Issue number
#2723
Screenshots/Video