mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
Make API aware of unapproved quotes.
This commit is contained in:
parent
82c0215b97
commit
b83a26c5a0
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ public class APIController : Controller
|
||||||
public ActionResult GetRandomQuote()
|
public ActionResult GetRandomQuote()
|
||||||
{
|
{
|
||||||
var db = new ApplicationDbContext();
|
var db = new ApplicationDbContext();
|
||||||
var quotes = db.Quotes.ToArray();
|
var quotes = db.Quotes.Where(x=>x.IsApproved).ToArray();
|
||||||
if (quotes.Length == 0)
|
if (quotes.Length == 0)
|
||||||
{
|
{
|
||||||
return Content(Serializer.Serialize(new Quote
|
return Content(Serializer.Serialize(new Quote
|
||||||
|
|
Loading…
Reference in a new issue