mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 14:04:12 +01:00
Removing viewapp command now that we directly redirect in cshtml
This commit is contained in:
parent
c7c0db612a
commit
652b958d4f
3 changed files with 10 additions and 20 deletions
|
@ -157,26 +157,16 @@ namespace BTCPayServer.Controllers
|
|||
app.TagAllInvoices = vm.UseAllStoreInvoices;
|
||||
app.SetSettings(newSettings);
|
||||
|
||||
if (command == "save")
|
||||
{
|
||||
await _AppService.UpdateOrCreateApp(app);
|
||||
await _AppService.UpdateOrCreateApp(app);
|
||||
|
||||
_EventAggregator.Publish(new AppUpdated()
|
||||
{
|
||||
AppId = appId,
|
||||
StoreId = app.StoreDataId,
|
||||
Settings = newSettings
|
||||
});
|
||||
TempData[WellKnownTempData.SuccessMessage] = "App updated";
|
||||
return RedirectToAction(nameof(UpdateCrowdfund), new { appId });
|
||||
}
|
||||
// TODO: Check with Kukks if we can remove this tricky logic of redirecting to viewapp
|
||||
// I've already switched do button directly linking to AppPublic ViewCrowdfund action
|
||||
else if (command == "viewapp")
|
||||
_EventAggregator.Publish(new AppUpdated()
|
||||
{
|
||||
return RedirectToAction(nameof(AppsPublicController.ViewCrowdfund), "AppsPublic", new { appId });
|
||||
}
|
||||
return NotFound();
|
||||
AppId = appId,
|
||||
StoreId = app.StoreDataId,
|
||||
Settings = newSettings
|
||||
});
|
||||
TempData[WellKnownTempData.SuccessMessage] = "App updated";
|
||||
return RedirectToAction(nameof(UpdateCrowdfund), new { appId });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
</div>
|
||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
||||
<div class="form-group">
|
||||
<button name="command" type="submit" class="btn btn-primary" value="save" id="SaveSettings">Save settings</button>
|
||||
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm">Invoices</a>
|
||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
</div>
|
||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
||||
<div class="form-group">
|
||||
<input type="submit" class="btn btn-primary" value="Save Settings" id="SaveSettings" />
|
||||
<button type="submit" class="btn btn-primary" id="SaveSettings">Save Settings</button>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm">Invoices</a>
|
||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
||||
|
|
Loading…
Add table
Reference in a new issue