✨ working get-endpoint in api!
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
0354b7c098
commit
b76bf74b1b
1 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,8 @@ public class MovieController: ControllerBase
|
||||||
) {
|
) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (IsValidS(s)) return StatusCode(400, "Bad Request: Invalid title");
|
if (!IsValidS(s)) return StatusCode(400, "Bad Request: Invalid title");
|
||||||
var movies = _context.Movies.Where(m => m.Title.Contains(s.ToLower()));
|
var movies = _context.Movies.Where(m => m.Title.ToLower().Contains(s.ToLower()));
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
if (!IsValidType(type)) return StatusCode(400, "Bad Request: Invalid type");
|
if (!IsValidType(type)) return StatusCode(400, "Bad Request: Invalid type");
|
||||||
|
|
Reference in a new issue