1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Fix organization_license not reading camelCase (#1832)

* Fix organization_license not reading camelCase

* Fix formatting
This commit is contained in:
Justin Baur
2022-02-01 12:26:50 -05:00
committed by GitHub
parent 1b233370eb
commit b47c30d4f4
3 changed files with 38 additions and 9 deletions

View File

@ -21,15 +21,8 @@ namespace Bit.Api.Utilities
{
try
{
using (var stream = file.OpenReadStream())
using (var reader = new StreamReader(stream))
{
var s = await reader.ReadToEndAsync();
if (!string.IsNullOrWhiteSpace(s))
{
obj = JsonSerializer.Deserialize<T>(s);
}
}
using var stream = file.OpenReadStream();
obj = await JsonSerializer.DeserializeAsync<T>(stream, JsonHelpers.IgnoreCase);
}
catch { }
}