From 183c242334a42f27c49830c9a0217b612aa20dd3 Mon Sep 17 00:00:00 2001 From: TidusJar Date: Wed, 23 Jan 2019 13:49:26 +0000 Subject: [PATCH] !wip improved the api for the actor search --- src/Ombi/Controllers/SearchController.cs | 4 ++-- src/Ombi/Models/SearchActorModel.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/Ombi/Models/SearchActorModel.cs diff --git a/src/Ombi/Controllers/SearchController.cs b/src/Ombi/Controllers/SearchController.cs index 08f889f08..535581447 100644 --- a/src/Ombi/Controllers/SearchController.cs +++ b/src/Ombi/Controllers/SearchController.cs @@ -54,13 +54,13 @@ namespace Ombi.Controllers /// /// Searches for movies by a certain actor. /// - /// The refinement model, language code and year are both optional. Language code uses ISO 639-1 + /// language code is optional, by default it will be en. Language code uses ISO 639-1 /// [HttpPost("movie/actor")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesDefaultResponseType] - public async Task SearchActor([FromBody] SearchMovieRefineModel model) + public async Task SearchActor([FromBody] SearchActorModel model) { if (model == null) { diff --git a/src/Ombi/Models/SearchActorModel.cs b/src/Ombi/Models/SearchActorModel.cs new file mode 100644 index 000000000..ad49282e9 --- /dev/null +++ b/src/Ombi/Models/SearchActorModel.cs @@ -0,0 +1,8 @@ +namespace Ombi.Models +{ + public class SearchActorModel + { + public string SearchTerm { get; set; } + public string LanguageCode { get; set; } = "en"; + } +}