1313
1414namespace App . Controllers
1515{
16+ [ ApiExplorerSettings ( IgnoreApi = true ) ]
1617 public class BlogController : Controller
1718 {
1819 IDataService _db ;
@@ -64,7 +65,7 @@ public async Task<IActionResult> Index(int page = 1, string term = "")
6465 return View ( string . Format ( _listView , blog . Theme ) , model ) ;
6566 }
6667
67- [ Route ( "posts/{slug}" ) ]
68+ [ HttpGet ( "posts/{slug}" ) ]
6869 public async Task < IActionResult > Single ( string slug )
6970 {
7071 try
@@ -88,7 +89,7 @@ public async Task<IActionResult> Single(string slug)
8889
8990 }
9091
91- [ Route ( "authors/{name}" ) ]
92+ [ HttpGet ( "authors/{name}" ) ]
9293 public async Task < IActionResult > Authors ( string name , int page = 1 )
9394 {
9495 var blog = await _db . CustomFields . GetBlogSettings ( ) ;
@@ -114,7 +115,7 @@ public async Task<IActionResult> Authors(string name, int page = 1)
114115 return View ( string . Format ( _listView , model . Blog . Theme ) , model ) ;
115116 }
116117
117- [ Route ( "categories/{name}" ) ]
118+ [ HttpGet ( "categories/{name}" ) ]
118119 public async Task < IActionResult > Categories ( string name , int page = 1 )
119120 {
120121 var blog = await _db . CustomFields . GetBlogSettings ( ) ;
@@ -139,7 +140,7 @@ public async Task<IActionResult> Categories(string name, int page = 1)
139140 return View ( string . Format ( _listView , model . Blog . Theme ) , model ) ;
140141 }
141142
142- [ Route ( "feed/{type}" ) ]
143+ [ HttpGet ( "feed/{type}" ) ]
143144 public async Task Rss ( string type )
144145 {
145146 Response . ContentType = "application/xml" ;
@@ -163,7 +164,7 @@ public async Task Rss(string type)
163164 }
164165 }
165166
166- [ Route ( "error/{code:int}" ) ]
167+ [ HttpGet ( "error/{code:int}" ) ]
167168 public async Task < IActionResult > Error ( int code )
168169 {
169170 var model = new PostModel ( ) ;
0 commit comments