diff --git a/.github/workflows/functions-deploy.yml b/.github/workflows/functions-deploy.yml index 7c68e98..f868d57 100644 --- a/.github/workflows/functions-deploy.yml +++ b/.github/workflows/functions-deploy.yml @@ -3,7 +3,7 @@ name: Deploy Azure Function on: push: paths: - - 'handlenett-backend/serverless/HttpTriggerTest/**' + - 'handlenett-backend/serverless/HandlenettNotifications/**' branches: - main @@ -32,7 +32,7 @@ jobs: } - name: Build the function app - run: dotnet publish handlenett-backend/serverless/HttpTriggerTest -c Release -o ./publish + run: dotnet publish handlenett-backend/serverless/HandlenettNotifications -c Release -o ./publish - name: List published files run: dir ./publish diff --git a/handlenett-backend/serverless/HttpTriggerTest/Function1Renamed.cs b/handlenett-backend/serverless/HttpTriggerTest/Function1Renamed.cs index 0e072d7..984a877 100644 --- a/handlenett-backend/serverless/HttpTriggerTest/Function1Renamed.cs +++ b/handlenett-backend/serverless/HttpTriggerTest/Function1Renamed.cs @@ -3,7 +3,7 @@ using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -namespace HttpTriggerTest +namespace HandlenettNotifications { public class Function1Renamed { @@ -14,7 +14,7 @@ public Function1Renamed(ILogger logger) _logger = logger; } - [Function("Function1")] + [Function("OnlyChangedAttribute")] public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req) { _logger.LogInformation("C# HTTP trigger function processed a request."); diff --git a/handlenett-backend/serverless/HttpTriggerTest/HttpTriggerTest.csproj b/handlenett-backend/serverless/HttpTriggerTest/HandlenettNotifications.csproj similarity index 100% rename from handlenett-backend/serverless/HttpTriggerTest/HttpTriggerTest.csproj rename to handlenett-backend/serverless/HttpTriggerTest/HandlenettNotifications.csproj diff --git a/handlenett-backend/serverless/HttpTriggerTest/HttpTriggerTest.sln b/handlenett-backend/serverless/HttpTriggerTest/HandlenettNotifications.sln similarity index 86% rename from handlenett-backend/serverless/HttpTriggerTest/HttpTriggerTest.sln rename to handlenett-backend/serverless/HttpTriggerTest/HandlenettNotifications.sln index f1a4cc9..02343ec 100644 --- a/handlenett-backend/serverless/HttpTriggerTest/HttpTriggerTest.sln +++ b/handlenett-backend/serverless/HttpTriggerTest/HandlenettNotifications.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.11.35208.52 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpTriggerTest", "HttpTriggerTest.csproj", "{396DFD5F-1ECB-429F-BAA7-235045DA8BD5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandlenettNotifications", "HandlenettNotifications.csproj", "{396DFD5F-1ECB-429F-BAA7-235045DA8BD5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/handlenett-backend/serverless/HttpTriggerTest/Properties/launchSettings.json b/handlenett-backend/serverless/HttpTriggerTest/Properties/launchSettings.json index 5e86d7c..1b0812a 100644 --- a/handlenett-backend/serverless/HttpTriggerTest/Properties/launchSettings.json +++ b/handlenett-backend/serverless/HttpTriggerTest/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "HttpTriggerTest": { + "HandlenettNotifications": { "commandName": "Project", "commandLineArgs": "--port 7124", "launchBrowser": false diff --git a/handlenett-backend/serverless/HttpTriggerTest/TestHttp.cs b/handlenett-backend/serverless/HttpTriggerTest/TestHttp.cs deleted file mode 100644 index e3f8572..0000000 --- a/handlenett-backend/serverless/HttpTriggerTest/TestHttp.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Azure.Functions.Worker; -using Microsoft.Extensions.Logging; - -namespace HttpTriggerTest -{ - public class TestHttp - { - private readonly ILogger _logger; - - public TestHttp(ILogger logger) - { - _logger = logger; - } - - [Function("TestHttp")] - public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req) - { - _logger.LogInformation("C# HTTP trigger function processed a request."); - return new OkObjectResult("Welcome to Azure Functions!"); - } - } -}