From 73bfff39400b56dba5ad9f49e59e1116053e273c Mon Sep 17 00:00:00 2001 From: Kun Deng Date: Mon, 5 Sep 2022 17:02:25 -0400 Subject: [PATCH] Cleanup --- Controllers/v1/GenreController.cs | 4 ++-- Controllers/v1/SongCompressedDataControllers.cs | 2 +- Controllers/v1/SongController.cs | 4 ++-- Controllers/v1/SongDataController.cs | 7 +------ Controllers/v1/SongStreamController.cs | 1 - 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Controllers/v1/GenreController.cs b/Controllers/v1/GenreController.cs index 8fbd4ff..d5a86c1 100644 --- a/Controllers/v1/GenreController.cs +++ b/Controllers/v1/GenreController.cs @@ -39,7 +39,7 @@ namespace Icarus.Controllers.V1 #region HTTP Routes [HttpGet] - public IActionResult RetrieveGenres() + public IActionResult GetGenres() { var genres = new List(); @@ -54,7 +54,7 @@ namespace Icarus.Controllers.V1 } [HttpGet("{id}")] - public IActionResult RetrieveGenre(int id) + public IActionResult GetGenre(int id) { var genre = new Genre { diff --git a/Controllers/v1/SongCompressedDataControllers.cs b/Controllers/v1/SongCompressedDataControllers.cs index 6045caf..789a5d4 100644 --- a/Controllers/v1/SongCompressedDataControllers.cs +++ b/Controllers/v1/SongCompressedDataControllers.cs @@ -46,7 +46,7 @@ namespace Icarus.Controllers.V1 #region API Routes [HttpGet("{id}")] - public async Task Get(int id) + public async Task DownloadCompressedSong(int id) { var context = new SongContext(_connectionString); diff --git a/Controllers/v1/SongController.cs b/Controllers/v1/SongController.cs index 39be0cf..c7ebe3d 100644 --- a/Controllers/v1/SongController.cs +++ b/Controllers/v1/SongController.cs @@ -48,7 +48,7 @@ namespace Icarus.Controllers.V1 [HttpGet] - public IActionResult RetrieveSongs() + public IActionResult GetSongs() { List songs = new List(); Console.WriteLine("Attemtping to retrieve songs"); @@ -65,7 +65,7 @@ namespace Icarus.Controllers.V1 } [HttpGet("{id}")] - public IActionResult RetrieveSong(int id) + public IActionResult GetSong(int id) { var context = new SongContext(_connectionString); diff --git a/Controllers/v1/SongDataController.cs b/Controllers/v1/SongDataController.cs index f459ef0..48341b6 100644 --- a/Controllers/v1/SongDataController.cs +++ b/Controllers/v1/SongDataController.cs @@ -48,7 +48,6 @@ namespace Icarus.Controllers.V1 [HttpGet("download/{id}")] - // [Route("private-scoped")] public IActionResult Download(int id) { var songContext = new SongContext(_connectionString); @@ -72,8 +71,6 @@ namespace Icarus.Controllers.V1 // Cover art // [HttpPost("upload"), DisableRequestSizeLimit] - // [ConflictingActionsResolver] - // [Route("private-scoped")] public IActionResult Upload([FromForm(Name = "file")] List songData) { try @@ -110,8 +107,6 @@ namespace Icarus.Controllers.V1 // as well as the cover art // [HttpPost("upload/with/data")] - // [ConflictingActionsResolver] - // [Route("private-scoped")] public IActionResult UploadWithData([FromForm] UploadSongWithDataForm up) { try @@ -162,7 +157,7 @@ namespace Icarus.Controllers.V1 { [FromForm(Name = "file")] public IFormFile SongData { get; set; } - // TODO: Think about making this optional and if it is not provided, use the stock cover art + // NOTE: Think about making this optional and if it is not provided, use the stock cover art [FromForm(Name = "cover")] public IFormFile CoverArtData { get; set; } [FromForm(Name = "metadata")] diff --git a/Controllers/v1/SongStreamController.cs b/Controllers/v1/SongStreamController.cs index ad8ef4d..de92076 100644 --- a/Controllers/v1/SongStreamController.cs +++ b/Controllers/v1/SongStreamController.cs @@ -44,7 +44,6 @@ namespace Icarus.Controllers.V1 #region HTTP endpoints - // [HttpGet] [HttpGet("{id}")] public async Task StreamSong(int id) {