-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 课程 Client #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ec99fe0
to
18864f5
Compare
宝宝你是一头生产队的驴😍😍😍 |
我喜欢你 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new course client to handle course-related functionalities across different platforms, including practice courses, physics courses, normal courses, and exam arrangements.
- Adds support for course-related endpoints in the client (practice, physics, and normal courses)
- Extends type definitions to include course-specific responses and schedules
- Updates the CAS authentication flows and main index integration for the new CourseClient
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
types/hust.ts | Added a new enum entry for 'course' to extend available client types |
types/clients/course/practice.ts | Introduced type definitions for practice course schedule responses |
types/clients/course/physics.ts | Introduced type definitions for physics course schedule and grade responses |
types/clients/course/common.ts | Added common types related to course scheduling |
package.json | Added dayjs dependency for date manipulation |
index.ts | Integrated the CourseClient into the main SDK and updated login flows |
clients/course/practice.ts | Implemented practice course schedule retrieval logic |
clients/course/physics.ts | Implemented physics course schedule and grade retrieval logic |
clients/course/course.ts | Implemented normal course schedule, grade retrieval, and exam arrangements mapping |
clients/course-client.ts | Created CourseClient class to encapsulate all course-related API calls |
auth/cas.ts | Updated authentication flows to support additional course login routes |
Comments suppressed due to low confidence (1)
types/clients/course/practice.ts:24
- [nitpick] The comment '工位名称?' is ambiguous. Consider clarifying its intent for better code documentation.
* 工位名称?
courseId: cls.KCBH, | ||
courseName: cls.KCMC, | ||
teacherName: cls.JSMC, | ||
roomName: cls.JSMC, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both teacherName and roomName are assigned the value from 'cls.JSMC'. Confirm whether this mapping is intended or if roomName should use a different field.
roomName: cls.JSMC, | |
roomName: cls.JSLB || '', // Assuming 'JSLB' represents the room name. |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你说得对
cc @wangyinyuan