diff options
| author | Michael <[email protected]> | 2017-05-31 18:48:45 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-31 18:48:45 -0400 |
| commit | b83a26c5a0095b89f0de48b5ec243fd2f727baec (patch) | |
| tree | b30f0a17f3076ee850d28605b65b741c67e2ed4f | |
| parent | 82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7 (diff) | |
| download | project-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.tar.gz project-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.tar.bz2 project-unite-b83a26c5a0095b89f0de48b5ec243fd2f727baec.zip | |
Make API aware of unapproved quotes.
| -rw-r--r-- | Project-Unite/Controllers/APIController.cs | 2 |
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 |
