-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/pratyush1718/counselor get route #67
base: main
Are you sure you want to change the base?
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.
Minor changes and fix the fixable linter issues.
Forgot that designers initially used counslors to mean members.
backend/src/app.ts
Outdated
|
||
|
||
const app: Express = express(); | ||
const port = process.env.PORT ?? 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.
set the default port to 3001, 3000 is where frontend is running
backend/src/app.ts
Outdated
|
||
app.use(express.json()); | ||
|
||
app.use("/api/user", userRoutes); |
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.
add the other routes that were added in the old index.ts file as well. They should have already been merged into main
backend/src/controllers/user.ts
Outdated
@@ -58,6 +60,15 @@ export const getAllUsers = (_req: Request, res: Response) => { | |||
} | |||
}; | |||
|
|||
export const getAllCounselors: RequestHandler = async (_req, res, next) => { |
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.
get all members.
I forgot for this route we intend to just get all members.
Designers chagned the wording from counselors to member
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 should get all the users
Tracking Info
Resolves #49
Changes
Added a counselor route/controller to get counselor information to populate counselor table. Also added 2 dummy documents in our mongodb user collection to test with.
MISC: also merged index.ts and app.ts into one file (app.ts under the src folder)
Testing
Postman testing
Confirmation of Change