From a1f98bc4a91a998a5eaf608a21fc5a615f6aa32c Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Wed, 8 Nov 2023 23:44:00 -0500 Subject: [PATCH] Updating api project --- api/SendEmail.cs | 6 +++--- api/api.csproj | 38 ++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/api/SendEmail.cs b/api/SendEmail.cs index 0805ef8..6c6e343 100644 --- a/api/SendEmail.cs +++ b/api/SendEmail.cs @@ -25,9 +25,9 @@ public static async Task Run( string message = req.Query["message"]; string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); dynamic data = JsonConvert.DeserializeObject(requestBody); - name = name ?? data?.name; - email = email ?? data?.email; - message = message ?? data?.message; + name ??= data?.name; + email ??= data?.email; + message ??= data?.message; var emailClient = new EmailClient(Environment.GetEnvironmentVariable("AZURE_COMMUNICATION_SERVICES_CONNECTION_STRING")); try { diff --git a/api/api.csproj b/api/api.csproj index 49655a8..79a9d40 100644 --- a/api/api.csproj +++ b/api/api.csproj @@ -1,21 +1,19 @@ - - - net8.0 - v4 - /subscriptions/bd3ab3e9-938d-42d8-832f-392ce5e24d51/resourceGroups/dsanchezcr/providers/microsoft.insights/components/dsanchezcr - - - - - - - - - PreserveNewest - - - PreserveNewest - Never - - + + + net6.0 + v4 + + + + + + + + + + + + PreserveNewest + + \ No newline at end of file