[WIP] SetAddress

main
Paul Schneider 7 years ago
parent 9af6e0fcb7
commit 58c380e09e
1 changed files with 2 additions and 2 deletions

@ -714,7 +714,7 @@ namespace Yavsc.Controllers
var uid = User.GetUserId(); var uid = User.GetUserId();
var user = await _dbContext.Users.Include(u=>u.PostalAddress).SingleAsync(u=>u.Id==uid); var user = await _dbContext.Users.Include(u=>u.PostalAddress).SingleAsync(u=>u.Id==uid);
ViewBag.GoogleSettings = _googleSettings; ViewBag.GoogleSettings = _googleSettings;
return View(user.PostalAddress); return View (new Yavsc.ViewModels.Manage.SetAddressViewModel { Street1 = user.PostalAddress?.Address } );
} }
[HttpPost] [HttpPost]
@ -736,7 +736,7 @@ namespace Yavsc.Controllers
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetAddressSuccess }); return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetAddressSuccess });
} }
ViewBag.GoogleSettings = _googleSettings; ViewBag.GoogleSettings = _googleSettings;
return View(model); return View(new Yavsc.ViewModels.Manage.SetAddressViewModel { Street1 = model.Address});
} }
public async Task<IActionResult> PaymentInfo (string id) public async Task<IActionResult> PaymentInfo (string id)
{ {

Loading…