Uncommenting code to use [HttpPost] verb attribute.

This commit is contained in:
Praburaj 2014-04-08 12:25:42 -07:00
parent 3d54a24244
commit 0db736b056
4 changed files with 14 additions and 24 deletions

View File

@ -39,8 +39,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/Login
//Bug: HTTP verb attribs not available
//[HttpPost]
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl)
@ -73,8 +72,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/Register
//Bug: Missing verb attributes
//[HttpPost]
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
public async Task<IActionResult> Register(RegisterViewModel model)
@ -101,8 +99,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/Disassociate
//Bug: HTTP verbs
//[HttpPost]
[HttpPost]
//[ValidateAntiForgeryToken]
public async Task<IActionResult> Disassociate(string loginProvider, string providerKey)
{
@ -142,8 +139,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/Manage
//Bug: No verb attributes
//[HttpPost]
[HttpPost]
//[ValidateAntiForgeryToken]
public async Task<IActionResult> Manage(ManageUserViewModel model)
{
@ -203,8 +199,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/ExternalLogin
//Bug: No verb attributes
//[HttpPost]
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
public IActionResult ExternalLogin(string provider, string returnUrl)
@ -244,8 +239,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/LinkLogin
//Bug: No HTTP verbs
//[HttpPost]
[HttpPost]
//[ValidateAntiForgeryToken]
public IActionResult LinkLogin(string provider)
{
@ -279,8 +273,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/ExternalLoginConfirmation
//Bug: No HTTP verbs
//[HttpPost]
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
public async Task<IActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
@ -321,8 +314,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/LogOff
//Bug: No HTTP verbs
//[HttpPost]
[HttpPost]
//[ValidateAntiForgeryToken]
public IActionResult LogOff()
{

View File

@ -24,9 +24,8 @@ namespace MusicStore.Controllers
//
// POST: /Checkout/AddressAndPayment
//Bug: Http verbs not available.
//Bug: Using direct model binding until we have TryUpdateModel available.
//[HttpPost]
[HttpPost]
//public IActionResult AddressAndPayment(FormCollection values)
public async Task<IActionResult> AddressAndPayment(Order order)
{

View File

@ -53,8 +53,7 @@ namespace MusicStore.Controllers
//
// AJAX: /ShoppingCart/RemoveFromCart/5
//Bug: Missing HTTP verb attribute
//[HttpPost]
[HttpPost]
public IActionResult RemoveFromCart(int id)
{
// Retrieve the current user's shopping cart

View File

@ -61,7 +61,7 @@ namespace MusicStore.Controllers
//Bug: SelectList not available
// POST: /StoreManager/Create
//[HttpPost]
[HttpPost]
public IActionResult Create(Album album)
{
if (ModelState.IsValid == true)
@ -98,8 +98,7 @@ namespace MusicStore.Controllers
//
// POST: /StoreManager/Edit/5
//Bug: Http actions not available
//[HttpPost]
[HttpPost]
public IActionResult Edit(Album album)
{
if (ModelState.IsValid == true)
@ -131,8 +130,9 @@ namespace MusicStore.Controllers
//
// POST: /StoreManager/Delete/5
//Bug: Missing HTTP verb & action name. ActionName out of scope for alpha - So fixing the name of method in code
//Bug: ActionName out of scope for alpha - So fixing the name of method in code
//[HttpPost, ActionName("Delete")]
[HttpPost]
//TODO: How to have an action with same name 'Delete'??
public IActionResult DeleteConfirmed(int id)
{