Skip to content

Commit

Permalink
Use primary constructor for LeaderboardsController
Browse files Browse the repository at this point in the history
  • Loading branch information
zysim committed Sep 5, 2024
1 parent 240699f commit 3223dde
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions LeaderboardBackend/Controllers/LeaderboardsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@

namespace LeaderboardBackend.Controllers;

public class LeaderboardsController : ApiController
public class LeaderboardsController(ILeaderboardService leaderboardService) : ApiController
{
private readonly ILeaderboardService _leaderboardService;

public LeaderboardsController(ILeaderboardService leaderboardService) =>
_leaderboardService = leaderboardService;
private readonly ILeaderboardService _leaderboardService = leaderboardService;

[AllowAnonymous]
[HttpGet("api/leaderboard/{id:long}")]
Expand Down

0 comments on commit 3223dde

Please sign in to comment.