Skip to content

Commit

Permalink
fixing more typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig committed Apr 10, 2024
1 parent 60c868a commit 3f6f349
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ccm_web/server/src/api/api.course.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class CourseApiHandler {
logger.debug(`Sending request to Canvas (get all pages) - Endpoint: ${endpoint}; Method: GET`)
const sectionsFull = await this.requestor.listItems<CanvasCourseSection>(endpoint, queryParams).toArray()
logger.debug('Received response (status code unknown)')
return sectionsFull.map(s => ({
return sectionsFull.map((s: CanvasCourseSection) => ({
id: s.id,
name: s.name,
course_id: s.course_id,
Expand Down
2 changes: 1 addition & 1 deletion ccm_web/server/src/api/api.section.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SectionApiHandler {
const errResponse = handleAPIError(error)
return { statusCode: errResponse.canvasStatusCode, errors: [errResponse] }
}
return enrollmentsResult.map(e => e.user.login_id)
return enrollmentsResult.map((e: CanvasEnrollmentWithUser) => e.user.login_id)
}

async enrollUser (user: SectionUserDto): Promise<CanvasEnrollment | APIErrorData> {
Expand Down

0 comments on commit 3f6f349

Please sign in to comment.