Simplify rest request mappings

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 7 years ago
parent 0b1c0eeb0a
commit f8a635ea9d
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 131
      libresonic-main/src/main/java/org/libresonic/player/controller/RESTController.java

@ -74,6 +74,7 @@ import static org.springframework.web.bind.ServletRequestUtils.*;
* @author Sindre Mehus
*/
@Controller
@RequestMapping("/rest")
public class RESTController {
private static final Logger LOG = LoggerFactory.getLogger(RESTController.class);
@ -152,7 +153,7 @@ public class RESTController {
}
}
@RequestMapping(value = "/rest/ping", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/ping", method = {RequestMethod.GET, RequestMethod.POST})
public void ping(HttpServletRequest request, HttpServletResponse response) throws Exception {
Response res = createResponse();
jaxbWriter.writeResponse(request, response, res);
@ -166,7 +167,7 @@ public class RESTController {
* @param response
* @throws Exception
*/
@RequestMapping(value = "/rest/getLicense", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getLicense", method = {RequestMethod.GET, RequestMethod.POST})
public void getLicense(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
License license = new License();
@ -184,7 +185,7 @@ public class RESTController {
}
@RequestMapping(value = "/rest/getMusicFolders", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getMusicFolders", method = {RequestMethod.GET, RequestMethod.POST})
public void getMusicFolders(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -201,7 +202,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getIndexes", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getIndexes", method = {RequestMethod.GET, RequestMethod.POST})
public void getIndexes(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Response res = createResponse();
@ -271,7 +272,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getGenres", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getGenres", method = {RequestMethod.GET, RequestMethod.POST})
public void getGenres(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Genres genres = new Genres();
@ -288,7 +289,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getSongsByGenre", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getSongsByGenre", method = {RequestMethod.GET, RequestMethod.POST})
public void getSongsByGenre(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -311,7 +312,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getArtists", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getArtists", method = {RequestMethod.GET, RequestMethod.POST})
public void getArtists(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -336,7 +337,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getSimilarSongs", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getSimilarSongs", method = {RequestMethod.GET, RequestMethod.POST})
public void getSimilarSongs(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -363,7 +364,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getSimilarSongs2", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getSimilarSongs2", method = {RequestMethod.GET, RequestMethod.POST})
public void getSimilarSongs2(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -391,7 +392,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getTopSongs", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getTopSongs", method = {RequestMethod.GET, RequestMethod.POST})
public void getTopSongs(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -413,7 +414,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getArtistInfo", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getArtistInfo", method = {RequestMethod.GET, RequestMethod.POST})
public void getArtistInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -449,7 +450,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getArtistInfo2", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getArtistInfo2", method = {RequestMethod.GET, RequestMethod.POST})
public void getArtistInfo2(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -506,7 +507,7 @@ public class RESTController {
return result;
}
@RequestMapping(value = "/rest/getArtist", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getArtist", method = {RequestMethod.GET, RequestMethod.POST})
public void getArtist(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -569,7 +570,7 @@ public class RESTController {
return jaxbPlaylist;
}
@RequestMapping(value = "/rest/getAlbum", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getAlbum", method = {RequestMethod.GET, RequestMethod.POST})
public void getAlbum(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -592,7 +593,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getSong", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getSong", method = {RequestMethod.GET, RequestMethod.POST})
public void getSong(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -614,7 +615,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getMusicDirectory", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getMusicDirectory", method = {RequestMethod.GET, RequestMethod.POST})
public void getMusicDirectory(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -658,7 +659,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/search", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/search", method = {RequestMethod.GET, RequestMethod.POST})
public void search(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -702,7 +703,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/search2", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/search2", method = {RequestMethod.GET, RequestMethod.POST})
public void search2(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -741,7 +742,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/search3", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/search3", method = {RequestMethod.GET, RequestMethod.POST})
public void search3(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -780,7 +781,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getPlaylists", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getPlaylists", method = {RequestMethod.GET, RequestMethod.POST})
public void getPlaylists(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -806,7 +807,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getPlaylist", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getPlaylist", method = {RequestMethod.GET, RequestMethod.POST})
public void getPlaylist(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -835,7 +836,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/jukeboxControl", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/jukeboxControl", method = {RequestMethod.GET, RequestMethod.POST})
public void jukeboxControl(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request, true);
@ -914,7 +915,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/createPlaylist", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/createPlaylist", method = {RequestMethod.GET, RequestMethod.POST})
public void createPlaylist(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request, true);
String username = securityService.getCurrentUsername(request);
@ -959,7 +960,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/updatePlaylist", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/updatePlaylist", method = {RequestMethod.GET, RequestMethod.POST})
public void updatePlaylist(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request, true);
String username = securityService.getCurrentUsername(request);
@ -1027,7 +1028,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/deletePlaylist", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deletePlaylist", method = {RequestMethod.GET, RequestMethod.POST})
public void deletePlaylist(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request, true);
String username = securityService.getCurrentUsername(request);
@ -1047,7 +1048,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getAlbumList", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getAlbumList", method = {RequestMethod.GET, RequestMethod.POST})
public void getAlbumList(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1098,7 +1099,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getAlbumList2", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getAlbumList2", method = {RequestMethod.GET, RequestMethod.POST})
public void getAlbumList2(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -1142,7 +1143,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getRandomSongs", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getRandomSongs", method = {RequestMethod.GET, RequestMethod.POST})
public void getRandomSongs(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1166,7 +1167,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getVideos", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getVideos", method = {RequestMethod.GET, RequestMethod.POST})
public void getVideos(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1185,7 +1186,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getNowPlaying", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getNowPlaying", method = {RequestMethod.GET, RequestMethod.POST})
public void getNowPlaying(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
NowPlaying result = new NowPlaying();
@ -1338,7 +1339,7 @@ public class RESTController {
return null;
}
@RequestMapping(value = "/rest/download", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/download", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView download(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1362,7 +1363,7 @@ public class RESTController {
return downloadController.handleRequest(request, response);
}
@RequestMapping(value = "/rest/stream", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/stream", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView stream(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1375,7 +1376,7 @@ public class RESTController {
return null;
}
@RequestMapping(value = "/rest/hls", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/hls", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView hls(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1397,7 +1398,7 @@ public class RESTController {
return null;
}
@RequestMapping(value = "/rest/scrobble", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/scrobble", method = {RequestMethod.GET, RequestMethod.POST})
public void scrobble(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -1430,12 +1431,12 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/star", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/star", method = {RequestMethod.GET, RequestMethod.POST})
public void star(HttpServletRequest request, HttpServletResponse response) throws Exception {
starOrUnstar(request, response, true);
}
@RequestMapping(value = "/rest/unstar", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/unstar", method = {RequestMethod.GET, RequestMethod.POST})
public void unstar(HttpServletRequest request, HttpServletResponse response) throws Exception {
starOrUnstar(request, response, false);
}
@ -1484,7 +1485,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getStarred", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getStarred", method = {RequestMethod.GET, RequestMethod.POST})
public void getStarred(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1507,7 +1508,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getStarred2", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getStarred2", method = {RequestMethod.GET, RequestMethod.POST})
public void getStarred2(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1530,7 +1531,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
public void getPodcasts(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1568,7 +1569,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getNewestPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getNewestPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
public void getNewestPodcasts(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1605,7 +1606,7 @@ public class RESTController {
return e;
}
@RequestMapping(value = "/rest/refreshPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/refreshPodcasts", method = {RequestMethod.GET, RequestMethod.POST})
public void refreshPodcasts(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1617,7 +1618,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/createPodcastChannel", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/createPodcastChannel", method = {RequestMethod.GET, RequestMethod.POST})
public void createPodcastChannel(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1631,7 +1632,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/deletePodcastChannel", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deletePodcastChannel", method = {RequestMethod.GET, RequestMethod.POST})
public void deletePodcastChannel(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1645,7 +1646,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/deletePodcastEpisode", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deletePodcastEpisode", method = {RequestMethod.GET, RequestMethod.POST})
public void deletePodcastEpisode(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1659,7 +1660,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/downloadPodcastEpisode", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/downloadPodcastEpisode", method = {RequestMethod.GET, RequestMethod.POST})
public void downloadPodcastEpisode(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1679,7 +1680,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getInternetRadioStations", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getInternetRadioStations", method = {RequestMethod.GET, RequestMethod.POST})
public void getInternetRadioStations(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -1697,7 +1698,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getBookmarks", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getBookmarks", method = {RequestMethod.GET, RequestMethod.POST})
public void getBookmarks(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1722,7 +1723,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/createBookmark", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/createBookmark", method = {RequestMethod.GET, RequestMethod.POST})
public void createBookmark(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -1737,7 +1738,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/deleteBookmark", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deleteBookmark", method = {RequestMethod.GET, RequestMethod.POST})
public void deleteBookmark(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -1749,7 +1750,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getPlayQueue", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getPlayQueue", method = {RequestMethod.GET, RequestMethod.POST})
public void getPlayQueue(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -1780,7 +1781,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/savePlayQueue", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/savePlayQueue", method = {RequestMethod.GET, RequestMethod.POST})
public void savePlayQueue(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String username = securityService.getCurrentUsername(request);
@ -1800,7 +1801,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getShares", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getShares", method = {RequestMethod.GET, RequestMethod.POST})
public void getShares(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1822,7 +1823,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/createShare", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/createShare", method = {RequestMethod.GET, RequestMethod.POST})
public void createShare(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Player player = playerService.getPlayer(request, response);
@ -1862,7 +1863,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/deleteShare", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deleteShare", method = {RequestMethod.GET, RequestMethod.POST})
public void deleteShare(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1882,7 +1883,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/updateShare", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/updateShare", method = {RequestMethod.GET, RequestMethod.POST})
public void updateShare(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -1955,19 +1956,19 @@ public class RESTController {
return result;
}
@RequestMapping(value = "/rest/getCoverArt", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getCoverArt", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView getCoverArt(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
return coverArtController.handleRequest(request, response);
}
@RequestMapping(value = "/rest/getAvatar", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getAvatar", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView getAvatar(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
return avatarController.handleRequest(request, response);
}
@RequestMapping(value = "/rest/changePassword", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/changePassword", method = {RequestMethod.GET, RequestMethod.POST})
public void changePassword(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -1991,7 +1992,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getUser", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getUser", method = {RequestMethod.GET, RequestMethod.POST})
public void getUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -2014,7 +2015,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/getUsers", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getUsers", method = {RequestMethod.GET, RequestMethod.POST})
public void getUsers(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
@ -2065,7 +2066,7 @@ public class RESTController {
return result;
}
@RequestMapping(value = "/rest/createUser", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/createUser", method = {RequestMethod.GET, RequestMethod.POST})
public void createUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -2101,7 +2102,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/updateUser", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/updateUser", method = {RequestMethod.GET, RequestMethod.POST})
public void updateUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -2159,7 +2160,7 @@ public class RESTController {
return request.getParameter(name) != null;
}
@RequestMapping(value = "/rest/deleteUser", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/deleteUser", method = {RequestMethod.GET, RequestMethod.POST})
public void deleteUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
User user = securityService.getCurrentUser(request);
@ -2179,7 +2180,7 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getLyrics", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/getLyrics", method = {RequestMethod.GET, RequestMethod.POST})
public void getLyrics(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
String artist = request.getParameter("artist");
@ -2196,7 +2197,7 @@ public class RESTController {
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/setRating", method = {RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/setRating", method = {RequestMethod.GET, RequestMethod.POST})
public void setRating(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
Integer rating = getRequiredIntParameter(request, "rating");

Loading…
Cancel
Save