public async Task <ActionResult> TipSlot(TipSlotModel model) { if (!ModelState.IsValid) { model.Items = await PaytopiaReader.GetTipSlotItems(); return(View("TipSlotModal", model)); } var result = await PaytopiaWriter.UpdateTipSlot(User.Identity.GetUserId(), model); if (!ModelState.IsWriterResultValid(result)) { model.Items = await PaytopiaReader.GetTipSlotItems(); return(View("TipSlotModal", model)); } return(CloseModal(result)); }