Skip to content

Commit e5252c3

Browse files
committed
CCM-7465: add dynamoDB to tf outputs and allow SRP auth flow. Which I need for some reason?
Revert "CCM-7465: remove undefined from API response" This reverts commit 33bd151. CCM-7465: move undefined back
1 parent 33bd151 commit e5252c3

File tree

6 files changed

+23
-5
lines changed

6 files changed

+23
-5
lines changed

lambdas/backend-api/src/__tests__/utils/remove-undefined.test.ts renamed to frontend/src/__tests__/utils/remove-undefined.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable unicorn/no-null */
2-
import { removeUndefinedFromObject } from '@backend-api/utils/remove-undefined';
2+
import { removeUndefinedFromObject } from '@utils/remove-undefined';
33

44
type TestType = {
55
param1: string;
File renamed without changes.

infrastructure/terraform/components/sandbox/aws_cognito_user_pool_client_sandbox.tf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ resource "aws_cognito_user_pool_client" "sandbox" {
44

55
explicit_auth_flows = [
66
"ALLOW_USER_PASSWORD_AUTH",
7-
"ALLOW_REFRESH_TOKEN_AUTH"
7+
"ALLOW_REFRESH_TOKEN_AUTH",
8+
"ALLOW_USER_SRP_AUTH"
89
]
10+
11+
access_token_validity = 1 # 1 hour
12+
id_token_validity = 1 # 1 hour
13+
refresh_token_validity = 1 # 1 day
14+
15+
token_validity_units {
16+
access_token = "hours"
17+
id_token = "hours"
18+
refresh_token = "days"
19+
}
920
}

infrastructure/terraform/components/sandbox/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ output "cognito_user_pool_id" {
99
output "cognito_user_pool_client_id" {
1010
value = aws_cognito_user_pool_client.sandbox.id
1111
}
12+
13+
output "dynamodb_table_templates" {
14+
value = module.backend_api.dynamodb_table_templates
15+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
output "api_base_url" {
22
value = aws_api_gateway_stage.main.invoke_url
33
}
4+
5+
output "dynamodb_table_templates" {
6+
value = aws_dynamodb_table.templates.name
7+
}

lambdas/backend-api/src/templates/api/responses.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { removeUndefinedFromObject } from '@backend-api/utils/remove-undefined';
21
import {
32
Failure,
43
Success,
@@ -15,7 +14,7 @@ export const apiSuccess = (
1514
statusCode,
1615
body: JSON.stringify({
1716
statusCode,
18-
templates: result.map((item) => removeUndefinedFromObject(item)),
17+
templates: result,
1918
} satisfies SuccessList),
2019
};
2120
}
@@ -24,7 +23,7 @@ export const apiSuccess = (
2423
statusCode,
2524
body: JSON.stringify({
2625
statusCode,
27-
template: removeUndefinedFromObject(result),
26+
template: result,
2827
} satisfies Success),
2928
};
3029
};

0 commit comments

Comments
 (0)