mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-04-27 02:40:23 +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 @@ namespace Project_Unite.Controllers
|
||||||
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…
Add table
Reference in a new issue