mirror of
https://github.com/bitwarden/server.git
synced 2025-07-20 00:47:16 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -44,22 +44,22 @@ namespace Bit.Admin.Controllers
|
||||
{
|
||||
var response = await _httpClient.GetAsync(
|
||||
$"https://hub.docker.com/v2/repositories/bitwarden/{repository}/tags/");
|
||||
if(response.IsSuccessStatusCode)
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
var data = JObject.Parse(json);
|
||||
var results = data["results"] as JArray;
|
||||
foreach(var result in results)
|
||||
foreach (var result in results)
|
||||
{
|
||||
var name = result["name"].ToString();
|
||||
if(!string.IsNullOrWhiteSpace(name) && name.Length > 0 && char.IsNumber(name[0]))
|
||||
if (!string.IsNullOrWhiteSpace(name) && name.Length > 0 && char.IsNumber(name[0]))
|
||||
{
|
||||
return new JsonResult(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(HttpRequestException) { }
|
||||
catch (HttpRequestException) { }
|
||||
|
||||
return new JsonResult("-");
|
||||
}
|
||||
@ -70,14 +70,14 @@ namespace Bit.Admin.Controllers
|
||||
{
|
||||
var response = await _httpClient.GetAsync(
|
||||
$"{_globalSettings.BaseServiceUri.InternalVault}/version.json");
|
||||
if(response.IsSuccessStatusCode)
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var json = await response.Content.ReadAsStringAsync();
|
||||
var data = JObject.Parse(json);
|
||||
return new JsonResult(data["version"].ToString());
|
||||
}
|
||||
}
|
||||
catch(HttpRequestException) { }
|
||||
catch (HttpRequestException) { }
|
||||
|
||||
return new JsonResult("-");
|
||||
}
|
||||
|
Reference in New Issue
Block a user