Skip to content

Commit

Permalink
Merge pull request #32 from FGA0138-MDS-Ajax/server
Browse files Browse the repository at this point in the history
removidos os logs
  • Loading branch information
Jose1277 authored Jul 1, 2024
2 parents ced5c32 + 18fde9b commit d3bdda5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions projeto/client/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ export const authOptions: NextAuthOptions = {
password: { label: 'Password', type: 'password' },
},
authorize: async (credentials) => {
console.log('Received credentials:', credentials);
try {
const response = await axios.post('http://localhost:8000/auth/login', {
email: credentials?.email,
password: credentials?.password,
});
console.log('Response from API:', response.data);

if (response.status === 200 && response.data) {
return {
Expand Down
4 changes: 1 addition & 3 deletions projeto/client/app/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function HomePage() {
const jogoBrData = data[0];
if (jogoBrData.campeonato && jogoBrData.data_hora && jogoBrData.time_1 && jogoBrData.time_2 && jogoBrData.channels) {
const JogoBR = new Match(jogoBrData.campeonato, jogoBrData.data_hora, jogoBrData.time_1, jogoBrData.time_2, jogoBrData.channels);
console.log(JogoBR);
setJogoBr(JogoBR);
} else {
console.error('Dados inválidos recebidos da API', jogoBrData);
Expand All @@ -97,7 +96,6 @@ export default function HomePage() {
const jogoLibData = data[0];
if (jogoLibData.campeonato && jogoLibData.data_hora && jogoLibData.time_1 && jogoLibData.time_2 && jogoLibData.channels) {
const JogoLib = new Match(jogoLibData.campeonato, jogoLibData.data_hora, jogoLibData.time_1, jogoLibData.time_2, jogoLibData.channels);
console.log(JogoLib);
setJogoLib(JogoLib);
} else {
console.error('Dados inválidos recebidos da API', data);
Expand Down Expand Up @@ -125,7 +123,7 @@ export default function HomePage() {
<div className="grid grid-cols-2 divide-white content-start">

<div className="pt-2 pl-4 pr-4 pb-2">
<h1 className={cn(h1ClassName, font.className)}>Rodada {rodada}</h1>
<h1 className={cn(h1ClassName, font.className)}>Rodada {rodada} do Brasileirão e Oitavas Libertadores</h1>
<GridTimes />
</div>

Expand Down
2 changes: 0 additions & 2 deletions projeto/client/components/auth/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ export const LoginForm = () => {
setSuccess(undefined);

startTransition(() => {
console.log('Submitting data:', data);
signIn('credentials', {
redirect: false,
email: data.email,
password: data.password,
}).then((response) => {
console.log('SignIn response:', response);
if (response?.error) {
setError(response.error);
} else {
Expand Down

0 comments on commit d3bdda5

Please sign in to comment.