mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Removing viewapp command now that we directly redirect in cshtml
This commit is contained in:
@@ -157,26 +157,16 @@ namespace BTCPayServer.Controllers
|
|||||||
app.TagAllInvoices = vm.UseAllStoreInvoices;
|
app.TagAllInvoices = vm.UseAllStoreInvoices;
|
||||||
app.SetSettings(newSettings);
|
app.SetSettings(newSettings);
|
||||||
|
|
||||||
if (command == "save")
|
await _AppService.UpdateOrCreateApp(app);
|
||||||
{
|
|
||||||
await _AppService.UpdateOrCreateApp(app);
|
|
||||||
|
|
||||||
_EventAggregator.Publish(new AppUpdated()
|
_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")
|
|
||||||
{
|
{
|
||||||
return RedirectToAction(nameof(AppsPublicController.ViewCrowdfund), "AppsPublic", new { appId });
|
AppId = appId,
|
||||||
}
|
StoreId = app.StoreDataId,
|
||||||
return NotFound();
|
Settings = newSettings
|
||||||
|
});
|
||||||
|
TempData[WellKnownTempData.SuccessMessage] = "App updated";
|
||||||
|
return RedirectToAction(nameof(UpdateCrowdfund), new { appId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
<input type="hidden" asp-for="NotificationEmailWarning" />
|
||||||
<div class="form-group">
|
<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">
|
<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">Invoices</a>
|
||||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input type="hidden" asp-for="NotificationEmailWarning" />
|
<input type="hidden" asp-for="NotificationEmailWarning" />
|
||||||
<div class="form-group">
|
<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">
|
<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">Invoices</a>
|
||||||
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
<a class="btn btn-outline-primary" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@Model.SearchTerm"
|
||||||
|
|||||||
Reference in New Issue
Block a user