Make API aware of unapproved quotes.

This commit is contained in:
Michael 2017-05-31 18:48:45 -04:00
parent 82c0215b97
commit b83a26c5a0

View file

@ -15,7 +15,7 @@ public class APIController : Controller
public ActionResult GetRandomQuote()
{
var db = new ApplicationDbContext();
var quotes = db.Quotes.ToArray();
var quotes = db.Quotes.Where(x=>x.IsApproved).ToArray();
if (quotes.Length == 0)
{
return Content(Serializer.Serialize(new Quote