Skip to content

[INTF25] - Delete legacy models#76

Merged
mxc-maggiechen merged 6 commits intomainfrom
INTF25-delete-legacy-models-2
Nov 2, 2025
Merged

[INTF25] - Delete legacy models#76
mxc-maggiechen merged 6 commits intomainfrom
INTF25-delete-legacy-models-2

Conversation

@mxc-maggiechen
Copy link
Contributor

@mxc-maggiechen mxc-maggiechen commented Oct 22, 2025

Notion ticket link

Delete legacy models

Implementation description

  • Deleted the following legacy models that were associated with the legacy database:
    • applicationDashboard
    • application
  • Deleted legacy code that reference the deleted models

Steps to test

  1. Run the web app and make sure you can login at /admin
  2. Go to /admin, you should see an empty table
image
  1. Go through the review page flow and see that the dummy data populates the review page properly
image

What should reviewers focus on?

  • Make sure there are no more references in the backend codebase to the legacy models
  • Make sure this effort didn't break anything
  • Users can still login
  • Make sure the dummy data populates the review page flow properly

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@mxc-maggiechen mxc-maggiechen changed the base branch from main to INTF25-drop-backend-queries October 22, 2025 02:08
@mxc-maggiechen mxc-maggiechen changed the title Intf25 delete legacy models 2 [INTF25] - Delete legacy models 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.");
}
});

Copy link
Contributor Author

@mxc-maggiechen mxc-maggiechen Oct 25, 2025

Choose a reason for hiding this comment

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

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.

Base automatically changed from INTF25-drop-backend-queries to main November 1, 2025 17:19
@mxc-maggiechen mxc-maggiechen marked this pull request as ready for review November 1, 2025 17:24
Copy link
Collaborator

@SaqAsh SaqAsh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@gavxue gavxue 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 👍

@mxc-maggiechen mxc-maggiechen merged commit 3a9e101 into main Nov 2, 2025
1 check passed
@mxc-maggiechen mxc-maggiechen deleted the INTF25-delete-legacy-models-2 branch November 2, 2025 22:14
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.

3 participants