handle register and poster and fix bugs

This commit is contained in:
Ehsan
2025-05-21 23:35:55 +03:30
parent 81f8042f6c
commit c469f2ee3c
23 changed files with 512 additions and 147 deletions
+13 -5
View File
@@ -1,21 +1,29 @@
import api from "./api";
import Cookies from "universal-cookie";
export const request = {
auth: (grant_type, client_id, client_secret, username, password) =>
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,
username,
password,
mobile_number,
code,
},
{
headers: {
Authorization: "",
"Content-Type": "application/x-www-form-urlencoded",
},
}
),