From b83a26c5a0095b89f0de48b5ec243fd2f727baec Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 31 May 2017 18:48:45 -0400 Subject: [PATCH] Make API aware of unapproved quotes. --- Project-Unite/Controllers/APIController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project-Unite/Controllers/APIController.cs b/Project-Unite/Controllers/APIController.cs index 6aae4ab..3ddb69a 100644 --- a/Project-Unite/Controllers/APIController.cs +++ b/Project-Unite/Controllers/APIController.cs @@ -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