Merged
Conversation
added 2 commits
October 21, 2025 22:06
mxc-maggiechen
commented
Oct 25, 2025
Comment on lines
-115
to
-160
| app.get("/termApplications", async (req, res) => { | ||
| ref | ||
| .orderByChild("term") | ||
| .equalTo("Fall 2023") // Fetch all applications for <term> (e.g. Fall 2023) | ||
| // eslint-disable-next-line func-names | ||
| .once("value", function (snapshot) { | ||
| const applications: Application[] = []; | ||
| snapshot.forEach((childSnapshot) => { | ||
| applications.push(childSnapshot.val()); | ||
| }); | ||
| res.status(200).json(applications); | ||
| }); | ||
| }); | ||
|
|
||
| app.get("/applications", async (req, res) => { | ||
| try { | ||
| const snapshot = await ref.once("value"); | ||
| const applications: Application[] = []; | ||
| snapshot.forEach((childSnapshot) => { | ||
| applications.push(childSnapshot.val()); | ||
| }); | ||
| res.status(200).json(applications); | ||
| } catch (error) { | ||
| res | ||
| .status(500) | ||
| .send("An error occurred while retrieving the applications."); | ||
| } | ||
| }); | ||
|
|
||
| app.get("/applications/:id", async (req, res) => { | ||
| try { | ||
| const { id } = req.params; | ||
| const snapshot = await ref.child(id).once("value"); | ||
| const application = snapshot.val(); | ||
| if (application) { | ||
| res.status(200).json(application); | ||
| } else { | ||
| res.status(404).send("Student application not found."); | ||
| } | ||
| } catch (error) { | ||
| res | ||
| .status(500) | ||
| .send("An error occurred while retrieving the student application."); | ||
| } | ||
| }); | ||
|
|
Contributor
Author
There was a problem hiding this comment.
These are calls to firebase to grab applicant information left from the previous team. However, it seems like we haven't been using these calls and instead have been relying on hardcoded sample data in backend/typescript/migrations/processedApplicants.json. We are deleting these calls for now because they are using legacy models, but we will be wrapping these firebase calls in a service function in the future with models from our new database schema.
added 3 commits
November 1, 2025 13:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notion ticket link
Delete legacy models
Implementation description
Steps to test
What should reviewers focus on?
Checklist