Skip to content

Commit 69c5f3a

Browse files
TD-4632 Using of AppRootPath to replace the url of the email invite
1 parent 4e48778 commit 69c5f3a

File tree

9 files changed

+9
-21
lines changed

9 files changed

+9
-21
lines changed

DigitalLearningSolutions.Data/Extensions/ConfigurationExtensions.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public static class ConfigurationExtensions
6060
private const string TableauViewName = "ViewName";
6161
private const string TableauSiteName = "SiteName";
6262
private const string TableauAuthApi = "AuthApiPath";
63-
private const string EmailInvite = "EmailInvite";
6463
public static string GetAppRootPath(this IConfiguration config)
6564
{
6665
return config[AppRootPathName]!;
@@ -269,9 +268,5 @@ public static string GetTableauViewName(this IConfiguration config)
269268
{
270269
return config[$"{TableauSectionKey}:{TableauViewName}"]!;
271270
}
272-
public static string GetEmailInvite(this IConfiguration config)
273-
{
274-
return config[EmailInvite]!;
275-
}
276271
}
277272
}

DigitalLearningSolutions.Web/Controllers/SuperAdmin/Centres/CentresController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public IActionResult Index(
138138
var centreEntity = this.centresService.UpdateCentreWithCounts(item);
139139
if (centreEntity.Centre.RegisterUser == 0 && centreEntity.Centre.AutoRegisterManagerEmail != null)
140140
{
141-
var baseUrl = config.GetEmailInvite();
141+
var baseUrl = config.GetAppRootPath();
142142
var supportEmail = this.configService.GetConfigValue("SupportEmail");
143-
baseUrl = baseUrl.Replace("{centreId}", item.Centre.CentreId.ToString());
143+
baseUrl = baseUrl+"/RegisterAdmin?centreId={centreId}".Replace("{centreId}", item.Centre.CentreId.ToString());
144144
Email welcomeEmail = this.passwordResetService.GenerateEmailInviteForCentreManager(centreEntity.Centre.CentreName, centreEntity.Centre.AutoRegisterManagerEmail, baseUrl, supportEmail);
145145
centreEntity.Centre.EmailInvite = "mailto:" + string.Join(",", welcomeEmail.To) + "?subject=" + welcomeEmail.Subject + "&body=" + welcomeEmail.Body.TextBody.Replace("&", "%26");
146146
}

DigitalLearningSolutions.Web/appSettings.UAT.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
"FreshdeskAPIConfig": {
2929
"GroupId": "80000650208",
3030
"ProductId": "80000003097"
31-
},
32-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
31+
}
3332
}

DigitalLearningSolutions.Web/appsettings.Development.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,5 @@
6969
},
7070
"LearningHubUserApi": {
7171
"UserApiUrl": "https://lh-userapi.dev.local/api/"
72-
},
73-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
72+
}
7473
}

DigitalLearningSolutions.Web/appsettings.Production.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@
2929
"LearningHubReportAPIConfig": {
3030
"BaseUrl": "https://reportapi.learninghub.nhs.uk",
3131
"ClientId": "BCDE972F-E007-4DFF-B233-8870474AEEAA"
32-
},
33-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
32+
}
3433
}

DigitalLearningSolutions.Web/appsettings.SIT.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,5 @@
4040
"LinkingEndpoint": "/create-user",
4141
"ClientCode": "DigitalLearningSolutions",
4242
"ClientCodeSso": "DigitalLearningSolutionsSso"
43-
},
44-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
43+
}
4544
}

DigitalLearningSolutions.Web/appsettings.Test.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
"MaxBulkUploadRows": 200,
2424
"LoginWithLearningHub": true
2525
},
26-
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
27-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
26+
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net"
2827
}

DigitalLearningSolutions.Web/appsettings.UarTest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@
2424
"MaxBulkUploadRows": 200,
2525
"LoginWithLearningHub": true
2626
},
27-
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
28-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
27+
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net"
2928
}

DigitalLearningSolutions.Web/appsettings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@
9292
"ClientSecretId": "38b99058-a806-4ee2-bf7a-ad1933a81ae5",
9393
"ClientSecret": ""
9494
},
95-
"UserResearchUrl": "https://forms.office.com/e/nKcK8AdHRX",
96-
"EmailInvite": "https://www.dls.nhs.uk/dls-uar-uat/RegisterAdmin?centreId={centreId}"
95+
"UserResearchUrl": "https://forms.office.com/e/nKcK8AdHRX"
9796
}

0 commit comments

Comments
 (0)