Skip to content

Conversation

pem00
Copy link
Contributor

@pem00 pem00 commented Aug 21, 2025

made a login page that gets the logged in user's chat page

@pem00 pem00 requested a review from balog-b August 21, 2025 21:14
Copy link
Collaborator

@balog-b balog-b left a 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) {
Copy link
Collaborator

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',
Copy link
Collaborator

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

Copy link
Collaborator

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

@pem00
Copy link
Contributor Author

pem00 commented Aug 23, 2025

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.

Copy link
Collaborator

@balog-b balog-b left a 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

@balog-b balog-b merged commit 717891c into main Aug 25, 2025
3 checks passed
@balog-b balog-b deleted the login-page-4 branch August 25, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants