jaja
This commit is contained in:
@ -13,13 +13,13 @@ require __DIR__.'/classes/lib.php';
|
|||||||
$db_connection = new Database();
|
$db_connection = new Database();
|
||||||
$conn = $db_connection->dbConnection();
|
$conn = $db_connection->dbConnection();
|
||||||
|
|
||||||
$data = json_decode(file_get_contents("php://input"));
|
//$data = json_decode(file_get_contents("php://input"));
|
||||||
// $data = json_decode(
|
$data = json_decode(
|
||||||
// '{
|
'{
|
||||||
// "email": "a@a.a",
|
"email": "a@q.q",
|
||||||
// "password": "qwertzui"
|
"password": "qwertzui"
|
||||||
// }'
|
}'
|
||||||
// );
|
);
|
||||||
$returnData = new CMsg(0);
|
$returnData = new CMsg(0);
|
||||||
|
|
||||||
// IF REQUEST METHOD IS NOT EQUAL TO POST
|
// IF REQUEST METHOD IS NOT EQUAL TO POST
|
||||||
|
|||||||
@ -84,10 +84,10 @@ export const UserCtxProvider = ({children}:TUserContextProviderProps) => {
|
|||||||
{
|
{
|
||||||
success: number;
|
success: number;
|
||||||
message: string;
|
message: string;
|
||||||
user: TUser | null;
|
data: TUser | null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
= { data : {success: 0, message: '', user: null } };
|
= { data : {success: 0, message: '', data: null } };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -98,9 +98,9 @@ export const UserCtxProvider = ({children}:TUserContextProviderProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const {data} = postReturn;
|
const {data} = postReturn;
|
||||||
if(data.success && data.user)
|
if(data.success && data.data)
|
||||||
{
|
{
|
||||||
setUser(data.user);
|
setUser(data.data);
|
||||||
setWait(false);
|
setWait(false);
|
||||||
return {success:1};
|
return {success:1};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user