Skip to content

Commit

Permalink
GetOrgItems
Browse files Browse the repository at this point in the history
  • Loading branch information
RobKraft committed Dec 4, 2024
1 parent 74d143e commit b2e2cee
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Lambdas/GetCharityTypes/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class Function
{
static string _dbHost = Environment.GetEnvironmentVariable("DB_HOST") ?? "reusefull.cq0mnx0ystdx.us-east-2.rds.amazonaws.com";
static string _dbName = Environment.GetEnvironmentVariable("DB_NAME") ?? "reusefull";
static int _dbPort = 3306; // int.Parse(Environment.GetEnvironmentVariable("DB_PORT") ?? "3306");
static RegionEndpoint _dbRegion = RegionEndpoint.USEast2;// RegionEndpoint.GetBySystemName(Environment.GetEnvironmentVariable("DB_REGION") ?? "us-east-2");
static int _dbPort = int.Parse(Environment.GetEnvironmentVariable("DB_PORT") ?? "3306");
static RegionEndpoint _dbRegion = RegionEndpoint.GetBySystemName(Environment.GetEnvironmentVariable("DB_REGION") ?? "us-east-2");
static string _dbUser = "reusefullrds";
private static string _connectionString = string.Empty;

Expand Down
4 changes: 2 additions & 2 deletions Lambdas/GetItemTypes/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class Function
{
static string _dbHost = Environment.GetEnvironmentVariable("DB_HOST") ?? "reusefull.cq0mnx0ystdx.us-east-2.rds.amazonaws.com";
static string _dbName = Environment.GetEnvironmentVariable("DB_NAME") ?? "reusefull";
static int _dbPort = 3306; // int.Parse(Environment.GetEnvironmentVariable("DB_PORT") ?? "3306");
static RegionEndpoint _dbRegion = RegionEndpoint.USEast2; // RegionEndpoint.GetBySystemName(Environment.GetEnvironmentVariable("DB_REGION") ?? "us-east-2");
static int _dbPort = int.Parse(Environment.GetEnvironmentVariable("DB_PORT") ?? "3306");
static RegionEndpoint _dbRegion = RegionEndpoint.GetBySystemName(Environment.GetEnvironmentVariable("DB_REGION") ?? "us-east-2");
static string _dbUser = "reusefullrds";
private static string _connectionString = string.Empty;

Expand Down
1 change: 1 addition & 0 deletions Lambdas/GetOrgItems/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private static async Task Main(string[] args)
#if DEBUG
_dbUser = "";
string pwd = "";

_connectionString = $"Server={_dbHost};Database={_dbName};Port={_dbPort};User Id={_dbUser};Password={pwd};SSL Mode=Required;";
var result = await FunctionHandler(null);
return;
Expand Down
4 changes: 3 additions & 1 deletion Lambdas/GetOrgItems/GetOrgItems.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AWSProjectType>Lambda</AWSProjectType>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions Lambdas/GetOrgItems/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"profiles": {
"Mock Lambda Test Tool": {
"commandName": "Executable",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe",
"commandLineArgs": "--port 5050",
"workingDirectory": ".\\bin\\$(Configuration)\\net8.0",
"executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe"
"workingDirectory": ".\\bin\\$(Configuration)\\net8.0"
},
"GetOrgItems": {
"commandName": "Project"
}
}
}
2 changes: 1 addition & 1 deletion Lambdas/GetOrgItems/aws-lambda-tools-defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"function-runtime": "dotnet8",
"function-memory-size": 512,
"function-timeout": 30,
"function-handler": "GetOrgs::GetOrgs.Function::FunctionHandler"
"function-handler": "bootstrap"
}

0 comments on commit b2e2cee

Please sign in to comment.