-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4042 from cisagov/feature/update-cisa-email
feature: cset-656 update contact email
- Loading branch information
Showing
8 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Controllers/DHSEmailController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace CSETWebCore.Api.Controllers | ||
{ | ||
[ApiController] | ||
[Route("api/[controller]")] | ||
public class EmailController : ControllerBase | ||
{ | ||
private readonly IConfiguration _configuration; | ||
|
||
public EmailController(IConfiguration configuration) | ||
{ | ||
_configuration = configuration; | ||
} | ||
|
||
[HttpGet("dhsemail")] | ||
public IActionResult GetDHSEmail() | ||
{ | ||
var dhsEmail = _configuration.GetValue<string>("Email:DHSEmail"); | ||
if (string.IsNullOrEmpty(dhsEmail)) | ||
{ | ||
return Ok("test"); // 204 No Content | ||
} | ||
return Ok(dhsEmail); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters