[Meta] Small fixes to variable names etc.

This commit is contained in:
Aaro Koivukangas
2026-09-21 15:24:21 +03:00
committed by Aaro Koivukangas
parent 7e1986e40a
commit fc2ad0f519
4 changed files with 5 additions and 5 deletions
@@ -4,8 +4,8 @@ import { CourseWithSubsDetails } from '@oodikone/shared/types/course'
import { CourseModel } from '../../models'
import { dbConnections } from '../../database/connection'
const likeTerm = (userInput: string, type: 'name' | 'code') => {
const searchTerm = userInput.trim().replace(/[\\%_]/g, '')
const likeTerm = (userInput: string | undefined, type: 'name' | 'code') => {
const searchTerm = userInput?.trim().replace(/[\\%_]/g, '')
if (!searchTerm) return undefined
return type === 'name'
@@ -245,7 +245,7 @@ export const findStudentsCloseToGraduation = async (studentNumbers?: string[]) =
include: [
{
model: CourseModel,
attributes: ['code', 'course_unit_type', 'groupId'],
attributes: ['code', 'courseUnitType', 'groupId'],
},
],
},
@@ -89,7 +89,7 @@ export const AttemptsTable = ({
courses: courseCodes,
separate,
unifyCourses: openOrRegular,
includeSubstitutions: combineSubstitutions,
substitutions: combineSubstitutions,
}
const searchString = queryParamsToString(queryObject)
return `/coursepopulation?${searchString}`
@@ -67,7 +67,7 @@ export const FoldableRow = ({
</>
) : (
<Typography component="span" variant="body2">
{realisation}
{getTextIn(realisation)}
</Typography>
)}
</Typography>