Switch from System.Text.Json to Newtonsoft, typify the BTCPayServer.Client

This commit is contained in:
nicolas.dorier
2020-03-20 14:01:51 +09:00
parent 2def9e7bd3
commit a0e638d500
14 changed files with 79 additions and 26 deletions

View File

@@ -128,7 +128,7 @@ namespace BTCPayServer.Controllers
}
await websocketHelper.Send("{ \"info\": \"ready\"}", cancellationToken);
o = JObject.Parse(await websocketHelper.NextMessageAsync(cancellationToken));
var authorization = await _authorizationService.AuthorizeAsync(User, Permission.CanModifyStoreSettings);
var authorization = await _authorizationService.AuthorizeAsync(User, Policies.CanModifyStoreSettings);
if (!authorization.Succeeded)
{
await websocketHelper.Send("{ \"error\": \"not-authorized\"}", cancellationToken);