Put now isn't allowed to change ids

ref #4
This commit is contained in:
Nicolai Ort 2020-11-27 19:59:07 +01:00
parent b267d87ba6
commit aef2f9562a

View File

@ -67,6 +67,10 @@ export class TrackController {
throw new TrackNotFoundError();
}
if(oldTrack.id != track.id){
throw new NotAcceptableError("The id's don't match!");
}
await this.trackRepository.update(oldTrack, track);
return track;
}