parent
b267d87ba6
commit
aef2f9562a
|
@ -64,7 +64,11 @@ export class TrackController {
|
|||
let oldTrack = await this.trackRepository.findOne({ id: id });
|
||||
|
||||
if (!oldTrack) {
|
||||
throw new TrackNotFoundError();
|
||||
throw new TrackNotFoundError();
|
||||
}
|
||||
|
||||
if(oldTrack.id != track.id){
|
||||
throw new NotAcceptableError("The id's don't match!");
|
||||
}
|
||||
|
||||
await this.trackRepository.update(oldTrack, track);
|
||||
|
|
Loading…
Reference in New Issue