Skip to content

Commit ecf108b

Browse files
depricated distance
1 parent bce4e38 commit ecf108b

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/common/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export type Dimension = (typeof DIMENSIONS)[number]
4545

4646
export type CourseRecommendation = {
4747
course: CourseData
48-
distance: number //<--- to be depricated
4948
coordinates: CourseCoordinates
5049
points?: number
5150
}
@@ -76,7 +75,6 @@ export type CourseCoordinates = {
7675
export type UserCoordinates = CourseCoordinates;
7776

7877
export type CourseRecommendations = {
79-
recommendations: CourseRecommendation[] //<-- to be depricated!
8078
pointBasedRecommendations: CourseRecommendation[]
8179
userCoordinates: UserCoordinates
8280
answerData?: AnswerData

src/server/util/recommender.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ async function calculateCourseCoordinates(course: CourseData, userCoordinates: U
238238

239239

240240

241-
//distance will get depricated soon
242-
return { course: course, distance: 0, coordinates: courseCoordinates }
241+
return { course: course, coordinates: courseCoordinates }
243242
}
244243

245244
//returns a list of courseRecommendation
@@ -399,7 +398,6 @@ async function getRecommendations(userCoordinates: UserCoordinates, answerData:
399398

400399
const allRecommendations = {
401400
pointBasedRecommendations: pointBasedRecommendations,
402-
recommendations: [], //this will get depricated
403401
userCoordinates: userCoordinates,
404402
}
405403

src/tests/pointRecommendCourses.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const createRecommendation = (
5757
credits: [],
5858
...(overrides.course || {}),
5959
},
60-
distance: overrides.distance ?? 0,
6160
coordinates: {
6261
date: 0,
6362
org: 1,

0 commit comments

Comments
 (0)