mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Lock user: Improve return code and fix docs (#4377)
* Lock user: Improve return code and fix docs The docs state that the `DELETE` method should be used, though the controller wants `POST`. The latter seems appropriate here, as the action can be used for locking and unlocking. Also adapted the action to return a status code based on the actual outcome of the user toggle call. Closes #4310. * Update clients
This commit is contained in:
@@ -1047,9 +1047,11 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
return GetFromActionResult<ApplicationUserData>(await GetController<GreenfieldUsersController>().GetUser(idOrEmail));
|
||||
}
|
||||
|
||||
public override async Task LockUser(string idOrEmail, bool disabled, CancellationToken token = default)
|
||||
public override async Task<bool> LockUser(string idOrEmail, bool disabled, CancellationToken token = default)
|
||||
{
|
||||
HandleActionResult(await GetController<GreenfieldUsersController>().LockUser(idOrEmail, new LockUserRequest() {Locked = disabled}));
|
||||
return GetFromActionResult<bool>(
|
||||
await GetController<GreenfieldUsersController>().LockUser(idOrEmail,
|
||||
new LockUserRequest { Locked = disabled }));
|
||||
}
|
||||
|
||||
public override async Task<OnChainWalletTransactionData> PatchOnChainWalletTransaction(string storeId,
|
||||
|
||||
Reference in New Issue
Block a user