Skip to content

Commit

Permalink
fix(api): skip checking when table not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
majusss committed Jan 1, 2024
1 parent aad5e77 commit cd424ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/pages/api/getSubstitutions.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/api/timetable/empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default async function handler(

if (process.env.NEXT_PUBLIC_SUBSTITUTIONS_URL) {
const substitutions = (await getSubstitutionsObject()).tables[0];
if (substitutions.dayIndex === dayIndex) {
if (substitutions?.dayIndex === dayIndex) {
substitutions.zastepstwa.forEach((sub) => {
if (
sub.class &&
Expand Down

0 comments on commit cd424ef

Please sign in to comment.