Fix build error stuff

This commit is contained in:
Gabriel Brown 2024-07-20 21:07:00 -05:00
parent e5b5722c5d
commit 7bf6f3d8c3
2 changed files with 3 additions and 4 deletions

View File

@ -3,6 +3,5 @@
# Tech Tracker Website # Tech Tracker Website
### [Find Here](https://techtracker.gibbyb.com/) ### [Find Here](https://techtracker.gibbyb.com/)
- **Note**: *The link above is actually not this repo just yet, but will be very soon.*
- Application used by COG employees to update their status & location throughout the day. - Application used by COG employees to update their status & location throughout the day.

View File

@ -95,9 +95,9 @@ export const legacyGetHistory = async (page: number, perPage: number): Promise<P
db.execute(countQuery), db.execute(countQuery),
]); ]);
// Get the results properly as an array of rows // Safely cast results
const historyRows = historyResults[0] as { name: string, status: string, updatedAt: Date }[]; const historyRows = historyResults[0] as unknown as { name: string, status: string, updatedAt: Date }[];
const countRow = countResults[0] as { total_count: number }[]; const countRow = countResults[0] as unknown as { total_count: number }[];
const totalCount = countRow[0]?.total_count || 0; const totalCount = countRow[0]?.total_count || 0;
const totalPages = Math.ceil(totalCount / perPage); const totalPages = Math.ceil(totalCount / perPage);