Skip to content
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

getRoomInfo returns start and end date #2596

Closed
wants to merge 2 commits into from
Closed

Conversation

golgetahir
Copy link
Contributor

@golgetahir golgetahir commented Oct 12, 2020

Pull Request

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 5 Code Smells

93.3% 93.3% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@mekya mekya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run one query and collect all information. Please look at the comment

@@ -1100,7 +1100,7 @@ public Result sendMessage(@ApiParam(value = "Message through Data Channel which
@Produces(MediaType.APPLICATION_JSON)
public RootRestService.RoomInfo getRoomInfo(@ApiParam(value="Room id", required=true) @PathParam("room_id") String roomId,
@ApiParam(value="If Stream Id is entered, that stream id will be isolated from the result",required = false) @QueryParam("streamId") String streamId){
return new RootRestService.RoomInfo(roomId,RestServiceBase.getRoomInfoFromConference(roomId,streamId,getDataStore()));
return new RootRestService.RoomInfo(roomId,RestServiceBase.getRoomInfoFromConference(roomId,streamId,getDataStore()),RestServiceBase.getEndDate(roomId,streamId,getDataStore()), RestServiceBase.getStartDate(roomId,streamId,getDataStore()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea. You make 3 queries to the database in this line. Run one query and collect all results.

@mekya
Copy link
Contributor

mekya commented Oct 13, 2020

Please reference the issue like this #2564
then the commit appears in the issue page

@golgetahir golgetahir closed this Oct 14, 2020
@golgetahir golgetahir deleted the update/getRoomInfo branch October 14, 2020 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants