summaryrefslogtreecommitdiff
path: root/Project-Unite
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-31 18:48:45 -0400
committerMichael <[email protected]>2017-05-31 18:48:45 -0400
commitb83a26c5a0095b89f0de48b5ec243fd2f727baec (patch)
treeb30f0a17f3076ee850d28605b65b741c67e2ed4f /Project-Unite
parent82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7 (diff)
downloadproject-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.tar.gz
project-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.tar.bz2
project-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.zip
Make API aware of unapproved quotes.
Diffstat (limited to 'Project-Unite')
-rw-r--r--Project-Unite/Controllers/APIController.cs2
1 files changed, 1 insertions, 1 deletions
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 @@ namespace Project_Unite.Controllers
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