mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
This commit is contained in:
@@ -29,7 +29,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
[HttpGet("~/api/v1/stores/{storeId}/users")]
|
||||
public IActionResult GetStoreUsers()
|
||||
{
|
||||
|
||||
|
||||
var store = HttpContext.GetStoreData();
|
||||
return store == null ? StoreNotFound() : Ok(FromModel(store));
|
||||
}
|
||||
@@ -45,10 +45,10 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
|
||||
if (await _storeRepository.RemoveStoreUser(storeId, userId))
|
||||
{
|
||||
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
return this.CreateAPIError(409, "store-user-role-orphaned", "Removing this user would result in the store having no owner.");
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
|
||||
private IEnumerable<StoreUserData> FromModel(Data.StoreData data)
|
||||
{
|
||||
return data.UserStores.Select(store => new StoreUserData() { UserId = store.ApplicationUserId, Role = store.Role});
|
||||
return data.UserStores.Select(store => new StoreUserData() { UserId = store.ApplicationUserId, Role = store.Role });
|
||||
}
|
||||
private IActionResult StoreNotFound()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user