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