that's all the API create routes! + some admin UI

Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
ari melody 2024-08-03 15:02:01 +01:00
parent 9329aa9f60
commit 494b29def3
11 changed files with 193 additions and 19 deletions

View file

@ -55,11 +55,11 @@ func UpdateTrackDB(db *sqlx.DB, track *model.Track) error {
return nil
}
func DeleteTrackDB(db *sqlx.DB, trackID string) error {
func DeleteTrackDB(db *sqlx.DB, track *model.Track) error {
_, err := db.Exec(
"DELETE FROM musictrack "+
"WHERE id=$1",
trackID,
track.ID,
)
if err != nil {
return err