mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
When creating PoS app, redirect to settings. When updating an app, redirect to List of apps.
This commit is contained in:
@@ -134,7 +134,7 @@ namespace BTCPayServer.Controllers
|
|||||||
});
|
});
|
||||||
await UpdateAppSettings(app);
|
await UpdateAppSettings(app);
|
||||||
StatusMessage = "App updated";
|
StatusMessage = "App updated";
|
||||||
return RedirectToAction(nameof(UpdatePointOfSale));
|
return RedirectToAction(nameof(ListApps));
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ namespace BTCPayServer.Controllers
|
|||||||
StatusMessage = "Error: You are not owner of this store";
|
StatusMessage = "Error: You are not owner of this store";
|
||||||
return RedirectToAction(nameof(ListApps));
|
return RedirectToAction(nameof(ListApps));
|
||||||
}
|
}
|
||||||
|
var id = Encoders.Base58.EncodeData(RandomUtils.GetBytes(32));
|
||||||
using (var ctx = _ContextFactory.CreateContext())
|
using (var ctx = _ContextFactory.CreateContext())
|
||||||
{
|
{
|
||||||
var id = Encoders.Base58.EncodeData(RandomUtils.GetBytes(32));
|
|
||||||
var appData = new AppData() { Id = id };
|
var appData = new AppData() { Id = id };
|
||||||
appData.StoreDataId = selectedStore;
|
appData.StoreDataId = selectedStore;
|
||||||
appData.Name = vm.Name;
|
appData.Name = vm.Name;
|
||||||
@@ -113,6 +113,9 @@ namespace BTCPayServer.Controllers
|
|||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
StatusMessage = "App successfully created";
|
StatusMessage = "App successfully created";
|
||||||
|
|
||||||
|
if (appType == AppType.PointOfSale)
|
||||||
|
return RedirectToAction(nameof(UpdatePointOfSale), new { appId = id });
|
||||||
return RedirectToAction(nameof(ListApps));
|
return RedirectToAction(nameof(ListApps));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user