Add post, fix delete forum, fix null pointer exceptions, min max limist

on database strings
This commit is contained in:
2017-06-12 17:22:58 +03:00
parent 1249950059
commit 430d02f59e
10 changed files with 148 additions and 22 deletions

View File

@@ -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);
}
}
}

View File

@@ -26,5 +26,10 @@ namespace WebApi.Controllers
{
return Ok(_foorumService.SearchFoorumTitle(title));
}
public IHttpActionResult GetAuthorPosts(string authorPosts)
{
return Ok(_foorumService.SearchPostAuthor(authorPosts));
}
}
}