Skip to content

Conversation

@rodolfo-gp
Copy link
Collaborator

Created Event and Participant Data model. Created routes and controllers for creating events, and getting event information. Commit History Is kind of messed up because My git crashed and bricked itself mid rebase while also committing, I cant even tell you how it happened. The only changes should be the creating event and participant models, event controller and routes. As well as adding said routes to the app.ts.

// router is like a mini-express app that allows grouping of related routes together
import { Router } from 'express';
import { getUsers, createUser } from '../controllers/user_controller';
import { getUsers, createUser } from '../controllers/user_controller.ts';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't matter much, but it is better to omit .ts

import { Router } from 'express';
import { getUsers, createUser } from '../controllers/user_controller';
import { getUsers, createUser } from '../controllers/user_controller.ts';
// Importing controller functions that handle logic for each route
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only diff in this file is verbose comments, it is recommended to keep comments minimal

passwordChangedAt?: Date;
createdAt?: Date;
updatedAt?: Date;
password: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is standard practice to store passwordHash instead of password, I think naming wise passwordHash is more descriptive

name: string;
email: string;
passwordHash: string;
lastLogin?: Date;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why the rest of the fields are removed here, they have been used and tested. For example passwordChangedAt is useful to invalidate existing JWTs/sessions after a password change

@lnqminh3003
Copy link
Collaborator

The reason failing of CI Build because of the change of user model

@rxmox rxmox merged commit 646e08b into backend Nov 28, 2025
1 check passed
@rxmox rxmox deleted the feature/STR-56-DataModels branch November 28, 2025 03:12
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.

4 participants