Last active
July 25, 2023 09:31
-
-
Save MahdiKarimipour/c0ef99687f966d964d2c79455005dbdd to your computer and use it in GitHub Desktop.
Pellerex Secret Usage
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
[ApiController] | |
[ApiVersion("1.0")] | |
public class AiController : ControllerBase | |
{ | |
private readonly AppSecrets appSecrets; | |
public AiController(ISampleAIService sampleAIService, IConfiguration configuration) | |
{ | |
this.appSecrets = configuration.Get<AppSecrets>(); | |
} | |
[HttpGet("hello")] | |
[MapToApiVersion("1.0")] | |
public async Task<ActionResult<AIResponseViewModel>> Process() | |
{ | |
return Ok(new ViewModel | |
{ | |
DbConnectionString = appSecrets.DbConnectionString | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment