Skip to content

Commit 895a03e

Browse files
author
Scott Bommarito
authored
Wrap HealthProbe endpoint in a Razor view (#7199)
1 parent aa62807 commit 895a03e

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/NuGetGallery/Controllers/ApiController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public virtual async Task<ActionResult> Status()
280280
[ActionName("HealthProbeApi")]
281281
public ActionResult HealthProbe()
282282
{
283-
return new HttpStatusCodeWithBodyResult(HttpStatusCode.OK, "Gallery is Available");
283+
return View();
284284
}
285285

286286
[HttpGet]

src/NuGetGallery/NuGetGallery.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,7 @@
19641964
<Content Include="Views\Packages\_ManageDeprecation.cshtml" />
19651965
<Content Include="Views\Shared\_MultiSelectDropdown.cshtml" />
19661966
<Content Include="Views\Packages\_DisplayPackageDeprecation.cshtml" />
1967+
<Content Include="Views\Api\HealthProbeApi.cshtml" />
19671968
</ItemGroup>
19681969
<ItemGroup>
19691970
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<section role="main" class="container main-container">
2+
<div class="row">
3+
<div class="@ViewHelpers.GetColumnClasses(ViewBag)">
4+
<h1>
5+
Health Probe
6+
</h1>
7+
<p>
8+
Gallery is available.
9+
</p>
10+
</div>
11+
</div>
12+
</section>

0 commit comments

Comments
 (0)