mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Removes track path editing from the music track update flow
Stops Track.UpdateDetails and Artist.UpdateTrackInAlbum from assigning a path, so a track path can be set only when the track is created. Removes Path from UpdateTrackRequest, UpdateTrackCommand, UpdateTrackCommandValidator and UpdateMusicTrackRequest, and removes the path containment check and IPathService dependency from UpdateTrackCommandHandler. The path stays visible in TrackResponse, MusicTrackDto and the read-only field of the track page. Updates the endpoint summary, request and API docs, and the affected tests.
This commit is contained in:
1 parent
728a879bb8
commit
1aa427b1e2
29 files changed
+47
-243
No files matched your search
+2
-7
@@ -31,7 +31,6 @@ public class UpdateTrackEndpointSummary : Summary<UpdateTrackEndpoint, UpdateTra
|
||||
Description = "Updates the details of the track identified by the route, returning the full details of the updated track. The track is updated by an Admin, who can update the tracks of all libraries, or by the owner of the library of the track.";
|
||||
|
||||
ExampleRequest = new UpdateTrackRequest(
|
||||
Path: "/music/queen/a-night-at-the-opera/01-bohemian-rhapsody.flac",
|
||||
Metadata: new MusicTrackMetadataDto(
|
||||
Title: "Bohemian Rhapsody",
|
||||
OriginalTitle: "Bohemian Rhapsody",
|
||||
@@ -124,7 +123,6 @@ public class UpdateTrackEndpointSummary : Summary<UpdateTrackEndpoint, UpdateTra
|
||||
DiscNumber: 1
|
||||
);
|
||||
|
||||
RequestParam(r => r.Path, "The file system path of the track. Required.");
|
||||
RequestParam(r => r.Metadata, "The audio metadata of the track. Required.");
|
||||
RequestParam(r => r.Metadata!.Title, "The title of the track. Required.");
|
||||
RequestParam(r => r.Metadata!.OriginalTitle, "The original title of the track. Optional.");
|
||||
@@ -397,7 +395,7 @@ public class UpdateTrackEndpointSummary : Summary<UpdateTrackEndpoint, UpdateTra
|
||||
}
|
||||
);
|
||||
|
||||
Response(409, "The request failed because the new file system path already belongs to another track in the library, or because a unique constraint was violated.", "application/problem+json",
|
||||
Response(409, "The request failed because a unique constraint was violated.", "application/problem+json",
|
||||
example: new
|
||||
{
|
||||
type = "https://tools.ietf.org/html/rfc9110#section-15.5.10",
|
||||
@@ -426,8 +424,6 @@ public class UpdateTrackEndpointSummary : Summary<UpdateTrackEndpoint, UpdateTra
|
||||
"ArtistIdCannotBeEmpty",
|
||||
"AlbumIdCannotBeEmpty",
|
||||
"TrackIdCannotBeEmpty",
|
||||
"TrackPathCannotBeEmpty",
|
||||
"TrackPathMustBeMaximum2048CharactersLong",
|
||||
"MetadataCannotBeNull",
|
||||
"TitleCannotBeEmpty",
|
||||
"TitleMustBeMaximum255CharactersLong",
|
||||
@@ -468,8 +464,7 @@ public class UpdateTrackEndpointSummary : Summary<UpdateTrackEndpoint, UpdateTra
|
||||
"RatingValueMustBePositive",
|
||||
"RatingValueCannotBeGreaterThanMaxValue",
|
||||
"RatingMaxValueMustBePositive",
|
||||
"RatingVoteCountMustBePositive",
|
||||
"TrackPathMustBeWithinLibraryContentLocations"
|
||||
"RatingVoteCountMustBePositive"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user