Change id types (#114)

* Change id types

* Updated more models

* Saving changes

* Should be it
This commit was merged in pull request #114.
This commit is contained in:
KD
2025-04-03 21:13:05 -04:00
committed by GitHub
parent 12c4f56a22
commit 8abb196e1d
29 changed files with 147 additions and 37 deletions
+3 -3
View File
@@ -57,7 +57,7 @@ public class SongController : BaseController
}
[HttpGet("{id}")]
public IActionResult GetSong(int id)
public IActionResult GetSong(Guid id)
{
var context = new SongContext(_connectionString!);
@@ -65,14 +65,14 @@ public class SongController : BaseController
Console.WriteLine("Here");
if (song.Id != 0)
if (song.Id.ToString().Length != 0)
return Ok(song);
else
return NotFound();
}
[HttpPut("{id}")]
public IActionResult UpdateSong(int id, [FromBody] Song song)
public IActionResult UpdateSong(Guid id, [FromBody] Song song)
{
song.Id = id;
Console.WriteLine("Retrieving filepath of song");