31 lines
540 B
JavaScript
31 lines
540 B
JavaScript
import api from "./api";
|
|
|
|
export const request = {
|
|
sendCode: (mobile_number) =>
|
|
api.post(
|
|
"api/v1/user/auth",
|
|
{ mobile_number },
|
|
{
|
|
headers: {
|
|
Authorization: "",
|
|
},
|
|
}
|
|
),
|
|
getToken: (grant_type, client_id, client_secret, mobile_number, code) =>
|
|
api.post(
|
|
"oauth/token",
|
|
{
|
|
grant_type,
|
|
client_id,
|
|
client_secret,
|
|
mobile_number,
|
|
code,
|
|
},
|
|
{
|
|
headers: {
|
|
Authorization: "",
|
|
},
|
|
}
|
|
),
|
|
};
|