-
Notifications
You must be signed in to change notification settings - Fork 0
Login page 4 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login page 4 #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to the Github checks as for what the problem is. Use pnpm lint
to check for issues before pushing. Otherwise, the login page looks good 👍
try { | ||
return await this.userService.getUserByName(username); | ||
} catch (error) { | ||
if (error instanceof BadRequestException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you would like to create the user if it does not exist. The exception that getUserByName throws is of type NotFoundException, not BadRequestException.
@@ -7,6 +7,11 @@ import { AppModule } from './app.module'; | |||
async function bootstrap(): Promise<void> { | |||
const app = await NestFactory.create(AppModule); | |||
|
|||
app.enableCors({ | |||
origin: process.env.FRONTEND_URL || 'http://localhost:3000', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's advised to add the FRONTEND_URL env var to the .env.example
file just so other people know that it needs to be set
bash.exe.stackdump
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file does not belong here. You should remove it
…o login-page-4
…o login-page-4
I think I fixed the issues, I had a little problem with stuff but I think I sorted it out! Please tell me if there's more issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you
made a login page that gets the logged in user's chat page