Skip to content

Commit be6ec09

Browse files
committed
Add docstrings for the functions added
1 parent 0304d88 commit be6ec09

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

client/src/module/student/ats/AtsScorePage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
CartesianGrid,
3939
} from "recharts";
4040

41+
/** Recharts custom tooltip — renders score, date, role, and resume name on dot hover. */
4142
function ScoreTooltip({ active, payload }: any) {
4243
if (!active || !payload?.length) return null;
4344
const d = payload[0].payload;

server/src/module/ats/ats.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export class AtsController {
145145
await sendEmail({ to: user.email, subject, html });
146146
}
147147

148+
/** GET /api/ats/history — returns the authenticated student's recent score history. */
148149
async getScoreHistory(req: Request, res: Response, next: NextFunction) {
149150
try {
150151
if (!req.user) {

server/src/module/ats/ats.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ Respond with ONLY valid JSON (no markdown formatting, no code blocks, no explana
310310
};
311311
}
312312

313+
/** Returns the latest 30 ATS scores for a student, sorted oldest-first for charting. */
313314
async getScoreHistory(studentId: number) {
314-
// latest 30, reversed to chronological order
315315
const rows = await prisma.atsScore.findMany({
316316
where: { studentId },
317317
select: {

0 commit comments

Comments
 (0)