-
Notifications
You must be signed in to change notification settings - Fork 17
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
EW-1070 creating post endpoints to create a course #5385
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
import { CourseCommonCartridgeMetadataResponse, CoursesApi, CreateCourseBodyParams } from './generated'; | ||
|
||
@Injectable() | ||
export class CoursesClientAdapter { |
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.
why should we move common-cartridge to infra?
} | ||
|
||
private async createCourse(parser: CommonCartridgeFileParser): Promise<void> { | ||
const courseName = parser.getTitle() || 'Untitled Course'; |
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.
SonarQube: Prefer using nullish coalescing operator (??
) instead of a logical or (||
), as it is a safer operator
const courseName = parser.getTitle() || 'Untitled Course'; | |
const courseName = parser.getTitle() ?? 'Untitled Course'; |
Description
This PR creates a POST endpoint for courses to create new courses on the API v3 route (NestJS). The
course-client
module was renamed tocourses-client
and was moved to theinfra
folder. The NPM scriptgenerate-client:courses-api
was created to simplify the generation of the client from an Open API specification.Links to Tickets or other pull requests
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.