Cleanup
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Icarus.Controllers.V1
|
|||||||
|
|
||||||
#region HTTP Routes
|
#region HTTP Routes
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IActionResult RetrieveGenres()
|
public IActionResult GetGenres()
|
||||||
{
|
{
|
||||||
var genres = new List<Genre>();
|
var genres = new List<Genre>();
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ namespace Icarus.Controllers.V1
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public IActionResult RetrieveGenre(int id)
|
public IActionResult GetGenre(int id)
|
||||||
{
|
{
|
||||||
var genre = new Genre
|
var genre = new Genre
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace Icarus.Controllers.V1
|
|||||||
|
|
||||||
#region API Routes
|
#region API Routes
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public async Task<IActionResult> Get(int id)
|
public async Task<IActionResult> DownloadCompressedSong(int id)
|
||||||
{
|
{
|
||||||
var context = new SongContext(_connectionString);
|
var context = new SongContext(_connectionString);
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace Icarus.Controllers.V1
|
|||||||
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IActionResult RetrieveSongs()
|
public IActionResult GetSongs()
|
||||||
{
|
{
|
||||||
List<Song> songs = new List<Song>();
|
List<Song> songs = new List<Song>();
|
||||||
Console.WriteLine("Attemtping to retrieve songs");
|
Console.WriteLine("Attemtping to retrieve songs");
|
||||||
@@ -65,7 +65,7 @@ namespace Icarus.Controllers.V1
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public IActionResult RetrieveSong(int id)
|
public IActionResult GetSong(int id)
|
||||||
{
|
{
|
||||||
var context = new SongContext(_connectionString);
|
var context = new SongContext(_connectionString);
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace Icarus.Controllers.V1
|
|||||||
|
|
||||||
|
|
||||||
[HttpGet("download/{id}")]
|
[HttpGet("download/{id}")]
|
||||||
// [Route("private-scoped")]
|
|
||||||
public IActionResult Download(int id)
|
public IActionResult Download(int id)
|
||||||
{
|
{
|
||||||
var songContext = new SongContext(_connectionString);
|
var songContext = new SongContext(_connectionString);
|
||||||
@@ -72,8 +71,6 @@ namespace Icarus.Controllers.V1
|
|||||||
// Cover art
|
// Cover art
|
||||||
//
|
//
|
||||||
[HttpPost("upload"), DisableRequestSizeLimit]
|
[HttpPost("upload"), DisableRequestSizeLimit]
|
||||||
// [ConflictingActionsResolver]
|
|
||||||
// [Route("private-scoped")]
|
|
||||||
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> songData)
|
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> songData)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -110,8 +107,6 @@ namespace Icarus.Controllers.V1
|
|||||||
// as well as the cover art
|
// as well as the cover art
|
||||||
//
|
//
|
||||||
[HttpPost("upload/with/data")]
|
[HttpPost("upload/with/data")]
|
||||||
// [ConflictingActionsResolver]
|
|
||||||
// [Route("private-scoped")]
|
|
||||||
public IActionResult UploadWithData([FromForm] UploadSongWithDataForm up)
|
public IActionResult UploadWithData([FromForm] UploadSongWithDataForm up)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -162,7 +157,7 @@ namespace Icarus.Controllers.V1
|
|||||||
{
|
{
|
||||||
[FromForm(Name = "file")]
|
[FromForm(Name = "file")]
|
||||||
public IFormFile SongData { get; set; }
|
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")]
|
[FromForm(Name = "cover")]
|
||||||
public IFormFile CoverArtData { get; set; }
|
public IFormFile CoverArtData { get; set; }
|
||||||
[FromForm(Name = "metadata")]
|
[FromForm(Name = "metadata")]
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ namespace Icarus.Controllers.V1
|
|||||||
|
|
||||||
|
|
||||||
#region HTTP endpoints
|
#region HTTP endpoints
|
||||||
// [HttpGet]
|
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public async Task<IActionResult> StreamSong(int id)
|
public async Task<IActionResult> StreamSong(int id)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user