55import java .util .List ;
66import java .util .Set ;
77
8- import javax .servlet .http .HttpServletRequest ;
9-
108import org .json .simple .JSONObject ;
119import org .springframework .beans .factory .annotation .Autowired ;
1210import org .springframework .http .HttpStatus ;
@@ -48,7 +46,7 @@ public class RoomController {
4846 */
4947 @ PostMapping ("/room/{roomName}" )
5048 @ JsonView (Room .NameOnly .class )
51- public ResponseEntity <Room > createNewRoom (@ PathVariable String roomName , HttpServletRequest request ) {
49+ public ResponseEntity <Room > createNewRoom (@ PathVariable String roomName ) {
5250 if (roomServ .findByName (roomName ) != null ) {
5351 return new ResponseEntity <>(HttpStatus .CONFLICT );
5452 }
@@ -66,7 +64,7 @@ public ResponseEntity<Room> createNewRoom(@PathVariable String roomName, HttpSer
6664 * @return the invite code
6765 */
6866 @ GetMapping ("/room/{roomName}/inviteCode/{role}" )
69- public ResponseEntity <String > getInviteCode (HttpServletRequest request , @ PathVariable String roomName , @ PathVariable String role ) {
67+ public ResponseEntity <String > getInviteCode (@ PathVariable String roomName , @ PathVariable String role ) {
7068 Room room = roomServ .findByName (roomName );
7169 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
7270 if (room != null ) {
@@ -109,7 +107,7 @@ public ResponseEntity<String> getRoomByInviteCodeOrName(@PathVariable String cod
109107 */
110108 @ PutMapping ("/room/{code}/user" )
111109 @ JsonView (User .WithRooms .class )
112- public ResponseEntity <User > newUserInRoom (HttpServletRequest request , @ PathVariable String code ) {
110+ public ResponseEntity <User > newUserInRoom (@ PathVariable String code ) {
113111 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
114112 Room room = roomServ .findByInviteCode (code );
115113
@@ -153,7 +151,7 @@ public ResponseEntity<User> newUserInRoom(HttpServletRequest request, @PathVaria
153151 @ SuppressWarnings ("unchecked" )
154152 @ JsonView (User .NameOnly .class )
155153 @ GetMapping ("/room/{roomName}/assistants" )
156- public ResponseEntity <JSONObject > getAssistants (@ PathVariable String roomName , HttpServletRequest request ) {
154+ public ResponseEntity <JSONObject > getAssistants (@ PathVariable String roomName ) {
157155 Room room = roomServ .findByName (roomName );
158156 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
159157 if (room == null ) {
@@ -203,7 +201,7 @@ public ResponseEntity<JSONObject> getAssistants(@PathVariable String roomName, H
203201 */
204202 @ SuppressWarnings ("unchecked" )
205203 @ PostMapping ("/room/{roomName}/raiseHand" )
206- public ResponseEntity <Integer > raiseHand (@ PathVariable String roomName , @ RequestBody JSONObject handRaisedUser , HttpServletRequest request ) {
204+ public ResponseEntity <Integer > raiseHand (@ PathVariable String roomName , @ RequestBody JSONObject handRaisedUser ) {
207205 Room room = roomServ .findByName (roomName );
208206 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
209207 if (room == null ) {
@@ -229,7 +227,7 @@ public ResponseEntity<Integer> raiseHand(@PathVariable String roomName, @Request
229227 * @return the httpStatus of the operation
230228 */
231229 @ DeleteMapping ("/room/{roomName}/raiseHand" )
232- public ResponseEntity <?> lowerHand (@ PathVariable String roomName , @ RequestBody JSONObject body , HttpServletRequest request ) {
230+ public ResponseEntity <?> lowerHand (@ PathVariable String roomName , @ RequestBody JSONObject body ) {
233231 Room room = roomServ .findByName (roomName );
234232 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
235233 if (room == null ) {
@@ -253,7 +251,7 @@ public ResponseEntity<?> lowerHand(@PathVariable String roomName, @RequestBody J
253251 * @return the list of the users raising their hand
254252 */
255253 @ GetMapping ("/room/{roomName}/raiseHand" )
256- public ResponseEntity <List <JSONObject >> getRaisedHands (@ PathVariable String roomName , HttpServletRequest request ) {
254+ public ResponseEntity <List <JSONObject >> getRaisedHands (@ PathVariable String roomName ) {
257255 Room room = roomServ .findByName (roomName );
258256 User user = userServ .findByName (this .userComponent .getLoggedUser ().getName ());
259257 if (room == null ) {
0 commit comments