diff options
Diffstat (limited to 'ExamTemplate/Web')
| -rw-r--r-- | ExamTemplate/Web/Startup.cs | 5 | ||||
| -rw-r--r-- | ExamTemplate/Web/appsettings.json | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ExamTemplate/Web/Startup.cs b/ExamTemplate/Web/Startup.cs index ba8737f..bfaab91 100644 --- a/ExamTemplate/Web/Startup.cs +++ b/ExamTemplate/Web/Startup.cs @@ -33,6 +33,11 @@ namespace ExamTemplate.Web * Dependency Injection configuration
*/
+ services.AddTransient<CloudinaryService>(options =>
+ new CloudinaryService(
+ cloudName: this.Configuration.GetSection("Cloud").GetSection("cloudName").Value,
+ apiKey: this.Configuration.GetSection("Cloud").GetSection("apiKey").Value,
+ apiSecret: this.Configuration.GetSection("Cloud").GetSection("apiSecret").Value));
services.AddTransient<UserService>();
/*
diff --git a/ExamTemplate/Web/appsettings.json b/ExamTemplate/Web/appsettings.json index f49d9ab..f1b58be 100644 --- a/ExamTemplate/Web/appsettings.json +++ b/ExamTemplate/Web/appsettings.json @@ -2,6 +2,11 @@ "ConnectionStrings": {
"LocalDBConnection": "Server=localhost;Port=5432;Database=TemplateContext;User Id=;Password=;"
},
+ "Cloud": {
+ "cloudName": "ExamTemplate",
+ "apiKey": "",
+ "apiSecret": ""
+ },
"Logging": {
"LogLevel": {
"Default": "Information",
|
