mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Remove TitleSlugRoute
This commit is contained in:
parent
98d987869c
commit
fe591816bb
@ -54,7 +54,6 @@ ProfileExistsValidator profileExistsValidator
|
||||
|
||||
GetResourceAll = AllMovie;
|
||||
GetResourceById = GetMovie;
|
||||
Get(TITLE_SLUG_ROUTE, GetByTitleSlug);
|
||||
|
||||
CreateResource = AddMovie;
|
||||
UpdateResource = UpdateMovie;
|
||||
@ -106,29 +105,6 @@ private List<MovieResource> AllMovie()
|
||||
return moviesResources;
|
||||
}
|
||||
|
||||
private object GetByTitleSlug(dynamic options)
|
||||
{
|
||||
string slug;
|
||||
try
|
||||
{
|
||||
slug = options.slug;
|
||||
// do stuff with x
|
||||
}
|
||||
catch (RuntimeBinderException)
|
||||
{
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return ResponseWithCode(MapToResource(_moviesService.FindByTitleSlug(slug)), HttpStatusCode.OK);
|
||||
}
|
||||
catch (ModelNotFoundException)
|
||||
{
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
}
|
||||
|
||||
private int AddMovie(MovieResource moviesResource)
|
||||
{
|
||||
var model = moviesResource.ToModel();
|
||||
|
Loading…
Reference in New Issue
Block a user