-
Notifications
You must be signed in to change notification settings - Fork 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
[Feature] - Add list of students #185
Conversation
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
@UseGuards(JwtAuthGuard) | ||
async studentList(@Param() courseId: CourseIdObject, @Res() res: Response) { | ||
const studentIdList = await this.callsService.getStudentList(courseId); | ||
const studentList = await Promise.all( |
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.
Instead of using Promise.all(...)
You can do : collection.find( { _id: { $in: [ObjectId("id"),...,...] } }).toArray()
@@ -11,7 +11,7 @@ export class CallsService { | |||
constructor( | |||
@Inject(forwardRef(() => UsersRepository)) | |||
@Inject(forwardRef(() => CallsRepository)) | |||
private usersRepository: UsersRepository, | |||
public usersRepository: UsersRepository, |
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.
Hmm.
this.message = ''; | ||
} else { | ||
this.message = "Vous n'avez pas de cours aujourd'hui"; | ||
} | ||
}, | ||
|
||
getStudentList() { |
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.
use -> getStudentList: withErrorHandler(async function() {
...
})
If the call return an error, your page crash.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This feature has been made to print the list of students of a same class in the scan zone