Skip to content

Commit 7987006

Browse files
Replaced value-only annotation parameters
1 parent 6d44351 commit 7987006

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

src/main/java/net/javadiscord/javabot/api/routes/metrics/MetricsController.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ public MetricsController(final JDA jda) {
4646
* @param guildId The guilds' id.
4747
* @return The {@link ResponseEntity}.
4848
*/
49-
@GetMapping(
50-
value = "{guild_id}/metrics"
51-
)
52-
public ResponseEntity<MetricsData> getMetrics(@PathVariable(value = "guild_id") long guildId) {
49+
@GetMapping("{guild_id}/metrics")
50+
public ResponseEntity<MetricsData> getMetrics(@PathVariable("guild_id") long guildId) {
5351
Guild guild = jda.getGuildById(guildId);
5452
if (guild == null) {
5553
throw new InvalidEntityIdException(Guild.class, "You've provided an invalid guild id!");

src/main/java/net/javadiscord/javabot/api/routes/qotw_leaderboard/QOTWLeaderboardController.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ public QOTWLeaderboardController(final JDA jda) {
4949
* @param amount The amount of users to return. Defaults to 3.
5050
* @return The {@link ResponseEntity}.
5151
*/
52-
@GetMapping(
53-
value = "{guild_id}/qotw/leaderboard",
54-
produces = MediaType.APPLICATION_JSON_VALUE
55-
)
52+
@GetMapping("{guild_id}/qotw/leaderboard")
5653
public ResponseEntity<List<QOTWMemberData>> getQOTWLeaderboard(
57-
@PathVariable(value = "guild_id") long guildId,
54+
@PathVariable("guild_id") long guildId,
5855
@RequestParam(value = "amount", defaultValue = "3") int amount
5956
) {
6057
Guild guild = jda.getGuildById(guildId);

src/main/java/net/javadiscord/javabot/api/routes/user_profile/UserProfileController.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,10 @@ public UserProfileController(final JDA jda) {
6262
* @param userId The users' id.
6363
* @return The {@link ResponseEntity} containing the {@link UserProfileData}.
6464
*/
65-
@GetMapping(
66-
value = "{guild_id}/{user_id}",
67-
produces = MediaType.APPLICATION_JSON_VALUE
68-
)
65+
@GetMapping("{guild_id}/{user_id}")
6966
public ResponseEntity<UserProfileData> getUserProfile(
70-
@PathVariable(value = "guild_id") long guildId,
71-
@PathVariable(value = "user_id") long userId
67+
@PathVariable("guild_id") long guildId,
68+
@PathVariable("user_id") long userId
7269
) {
7370
Guild guild = jda.getGuildById(guildId);
7471
if (guild == null) {

0 commit comments

Comments
 (0)