parent
b267d87ba6
commit
aef2f9562a
@ -64,7 +64,11 @@ export class TrackController {
|
|||||||
let oldTrack = await this.trackRepository.findOne({ id: id });
|
let oldTrack = await this.trackRepository.findOne({ id: id });
|
||||||
|
|
||||||
if (!oldTrack) {
|
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);
|
await this.trackRepository.update(oldTrack, track);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user