Add post, fix delete forum, fix null pointer exceptions, min max limist
on database strings
This commit is contained in:
@@ -83,5 +83,15 @@ namespace WebApi.Controllers
|
||||
|
||||
return Ok(f);
|
||||
}
|
||||
|
||||
public IHttpActionResult PostPost(int id, [FromBody] PostDTO post)
|
||||
{
|
||||
var p = _foorumService.AddPost(id, post);
|
||||
if (p == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
return Ok(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,5 +26,10 @@ namespace WebApi.Controllers
|
||||
{
|
||||
return Ok(_foorumService.SearchFoorumTitle(title));
|
||||
}
|
||||
|
||||
public IHttpActionResult GetAuthorPosts(string authorPosts)
|
||||
{
|
||||
return Ok(_foorumService.SearchPostAuthor(authorPosts));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user