bug reporting & a fix

This commit is contained in:
2019-05-18 09:42:50 +01:00
parent dbafacefca
commit ddd4754b98
14 changed files with 206 additions and 15 deletions

View File

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
@ -11,6 +12,8 @@ namespace Yavsc.Controllers
{
[Produces("application/json")]
[Route("api/blog")]
[AllowAnonymous]
public class BlogApiController : Controller
{
private ApplicationDbContext _context;
@ -24,7 +27,7 @@ namespace Yavsc.Controllers
[HttpGet]
public IEnumerable<BlogPost> GetBlogspot()
{
return _context.Blogspot.Where(b=>b.Visible).OrderByDescending(b=>b.UserModified);
return _context.Blogspot.Where(b => b.Visible).OrderByDescending(b => b.UserModified);
}
// GET: api/BlogApi/5
@ -145,4 +148,4 @@ namespace Yavsc.Controllers
return _context.Blogspot.Count(e => e.Id == id) > 0;
}
}
}
}