-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASAP-756 Save Cookie Preferences in DynamoDB (#4438)
* ASAP-756 Save Cookie Preferences in DynamoDB * add get * remove some logs * adding gp2 handlers and things on serverless * add factory test * coverage + adding log info again * print get response * add cookie not found case in get-cookie-factory-handler * parse get response * fix typecheck * fix issues * frontend send request to store cookie data in dynamodb * update test * use test throughout * state update to be made in different pr --------- Co-authored-by: AkosuaA <nattuah@gmail.com>
- Loading branch information
Showing
98 changed files
with
2,847 additions
and
31 deletions.
There are no files selected for viewing
Binary file added
BIN
+25 KB
.yarn/cache/@aws-crypto-sha256-browser-npm-5.2.0-5e8b02b82a-773f12f202.zip
Binary file not shown.
Binary file added
BIN
+42.2 KB
.yarn/cache/@aws-crypto-sha256-js-npm-5.2.0-fbe0f9fbf6-007fbe0436.zip
Binary file not shown.
Binary file added
BIN
+14.8 KB
.yarn/cache/@aws-crypto-supports-web-crypto-npm-5.2.0-37acf6e569-6ffc21de48.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+403 KB
.yarn/cache/@aws-sdk-client-dynamodb-npm-3.687.0-d3041f734e-ad13b2395f.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+86.3 KB
.yarn/cache/@aws-sdk-client-sso-oidc-npm-3.687.0-dadfc4a686-baa3a4ceb1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.2 KB
.yarn/cache/@aws-sdk-credential-provider-env-npm-3.686.0-c32c29b6bb-2c574da1ce.zip
Binary file not shown.
Binary file added
BIN
+20.2 KB
.yarn/cache/@aws-sdk-credential-provider-http-npm-3.686.0-f9e475b1c3-b503ae6c86.zip
Binary file not shown.
Binary file added
BIN
+25.1 KB
.yarn/cache/@aws-sdk-credential-provider-ini-npm-3.687.0-993f941fcb-1718843c54.zip
Binary file not shown.
Binary file added
BIN
+15.8 KB
.yarn/cache/@aws-sdk-credential-provider-node-npm-3.687.0-dc169c4709-fc542feefd.zip
Binary file not shown.
Binary file added
BIN
+14.4 KB
.yarn/cache/@aws-sdk-credential-provider-process-npm-3.686.0-6fad3fad8f-5b73373200.zip
Binary file not shown.
Binary file added
BIN
+18.7 KB
.yarn/cache/@aws-sdk-credential-provider-sso-npm-3.687.0-31290d36cb-27435cc47d.zip
Binary file not shown.
Binary file added
BIN
+15.9 KB
.yarn/cache/@aws-sdk-credential-provider-web-identity-npm-3.686.0-2e1a1df1b3-dbe042d773.zip
Binary file not shown.
Binary file added
BIN
+11.3 KB
.yarn/cache/@aws-sdk-endpoint-cache-npm-3.679.0-1695d16abf-8114dfe96f.zip
Binary file not shown.
Binary file added
BIN
+20.4 KB
.yarn/cache/@aws-sdk-middleware-endpoint-discovery-npm-3.686.0-bb982e9729-8e6e8bc306.zip
Binary file not shown.
Binary file added
BIN
+9.31 KB
.yarn/cache/@aws-sdk-middleware-host-header-npm-3.686.0-2756c40e3b-ed423fadd1.zip
Binary file not shown.
Binary file added
BIN
+9.72 KB
.yarn/cache/@aws-sdk-middleware-logger-npm-3.686.0-8093b1fa18-513e20d119.zip
Binary file not shown.
Binary file added
BIN
+9.49 KB
.yarn/cache/@aws-sdk-middleware-recursion-detection-npm-3.686.0-945b986908-fe30ad3d39.zip
Binary file not shown.
Binary file added
BIN
+18.9 KB
.yarn/cache/@aws-sdk-middleware-user-agent-npm-3.687.0-d51a06afb1-ca17d118d3.zip
Binary file not shown.
Binary file added
BIN
+17 KB
.yarn/cache/@aws-sdk-region-config-resolver-npm-3.686.0-1eeebef0e3-d9ea4e6715.zip
Binary file not shown.
Binary file added
BIN
+21.6 KB
.yarn/cache/@aws-sdk-token-providers-npm-3.686.0-675c1baecc-eae1cf27c7.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+27.7 KB
.yarn/cache/@aws-sdk-util-endpoints-npm-3.686.0-b37a89ecd7-b6bfb0edba.zip
Binary file not shown.
Binary file added
BIN
+11.8 KB
.yarn/cache/@aws-sdk-util-user-agent-browser-npm-3.686.0-18c08c26a4-8a86a11235.zip
Binary file not shown.
Binary file added
BIN
+13.5 KB
.yarn/cache/@aws-sdk-util-user-agent-node-npm-3.687.0-9e8586cb03-2c6f282565.zip
Binary file not shown.
Binary file added
BIN
+11.5 KB
.yarn/cache/@smithy-abort-controller-npm-3.1.6-62b88c57a3-abba34cc47.zip
Binary file not shown.
Binary file added
BIN
+45.3 KB
.yarn/cache/@smithy-config-resolver-npm-3.0.10-e5477b5b0a-55c2355db7.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+44 KB
.yarn/cache/@smithy-credential-provider-imds-npm-3.2.5-897e775714-4c8941e3c3.zip
Binary file not shown.
Binary file added
BIN
+15.9 KB
.yarn/cache/@smithy-fetch-http-handler-npm-4.0.0-12fbe37466-43fc885152.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.2 KB
.yarn/cache/@smithy-invalid-dependency-npm-3.0.8-a5739eda3c-ad55921e70.zip
Binary file not shown.
Binary file added
BIN
+7.96 KB
.yarn/cache/@smithy-is-array-buffer-npm-3.0.0-8e8215ad1c-ce7440fcb1.zip
Binary file not shown.
Binary file added
BIN
+9.18 KB
.yarn/cache/@smithy-middleware-content-length-npm-3.0.10-5527bc6946-776fd90142.zip
Binary file not shown.
Binary file added
BIN
+36.8 KB
.yarn/cache/@smithy-middleware-endpoint-npm-3.2.1-c1ffcc5523-acc41e1b66.zip
Binary file not shown.
Binary file added
BIN
+35.6 KB
.yarn/cache/@smithy-middleware-retry-npm-3.0.25-32348e9d26-d10264cbff.zip
Binary file not shown.
Binary file added
BIN
+13.5 KB
.yarn/cache/@smithy-middleware-serde-npm-3.0.8-8a5a7cc209-3d1ba26968.zip
Binary file not shown.
Binary file added
BIN
+15.3 KB
.yarn/cache/@smithy-middleware-stack-npm-3.0.8-8ece208619-c4a24dcdb1.zip
Binary file not shown.
Binary file added
BIN
+17 KB
.yarn/cache/@smithy-node-config-provider-npm-3.1.9-6c7439e93a-fc0d27ff62.zip
Binary file not shown.
Binary file added
BIN
+45.6 KB
.yarn/cache/@smithy-node-http-handler-npm-3.2.5-3be5db9697-ea8d4148dd.zip
Binary file not shown.
Binary file added
BIN
+20.3 KB
.yarn/cache/@smithy-property-provider-npm-3.1.8-d0a3470b51-acf8a3cc0c.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.49 KB
.yarn/cache/@smithy-querystring-builder-npm-3.0.8-5da1f39059-b07a766fb1.zip
Binary file not shown.
Binary file added
BIN
+8.35 KB
.yarn/cache/@smithy-querystring-parser-npm-3.0.8-9183bce291-4ad9edfd96.zip
Binary file not shown.
Binary file added
BIN
+11.7 KB
.yarn/cache/@smithy-service-error-classification-npm-3.0.8-0eddcbcdc3-cba6d33eb0.zip
Binary file not shown.
Binary file added
BIN
+34.8 KB
.yarn/cache/@smithy-shared-ini-file-loader-npm-3.1.9-a31186602b-571cc78565.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.79 KB
.yarn/cache/@smithy-util-body-length-browser-npm-3.0.0-868397df97-b01d8258b9.zip
Binary file not shown.
Binary file added
BIN
+9.57 KB
.yarn/cache/@smithy-util-body-length-node-npm-3.0.0-9d33ec493b-da1baf4790.zip
Binary file not shown.
Binary file added
BIN
+8.53 KB
.yarn/cache/@smithy-util-buffer-from-npm-3.0.0-7f54bf03c3-1bfc4ab093.zip
Binary file not shown.
Binary file added
BIN
+12.3 KB
.yarn/cache/@smithy-util-config-provider-npm-3.0.0-f3b040d73b-fc0f5f57d3.zip
Binary file not shown.
Binary file added
BIN
+14.7 KB
.yarn/cache/@smithy-util-defaults-mode-browser-npm-3.0.25-058508f59b-87c4b346d7.zip
Binary file not shown.
Binary file added
BIN
+14.5 KB
.yarn/cache/@smithy-util-defaults-mode-node-npm-3.0.25-2ce29c087b-e34c44bb5c.zip
Binary file not shown.
Binary file added
BIN
+73.9 KB
.yarn/cache/@smithy-util-endpoints-npm-2.1.4-2288ef6faf-523df0a358.zip
Binary file not shown.
Binary file added
BIN
+8.72 KB
.yarn/cache/@smithy-util-hex-encoding-npm-3.0.0-55c86ac7d0-dd32fd71e9.zip
Binary file not shown.
Binary file added
BIN
+10.6 KB
.yarn/cache/@smithy-util-middleware-npm-3.0.8-1cfc852eab-6933c012f4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.1 KB
.yarn/cache/@smithy-util-uri-escape-npm-3.0.0-aa29683710-d7ee01c978.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
apps/crn-server/src/handlers/cookie-preferences/get-cookie-preferences-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* istanbul ignore file */ | ||
import { getCookiePreferencesHandlerFactory } from '@asap-hub/server-common'; | ||
import { framework as lambda } from '@asap-hub/services-common'; | ||
import { Handler } from 'aws-lambda'; | ||
|
||
import { cookiePreferencesTableName } from '../../config'; | ||
import logger from '../../utils/logger'; | ||
import { sentryWrapper } from '../../utils/sentry-wrapper'; | ||
|
||
export const getCookiePreferencesHandler = lambda.http( | ||
getCookiePreferencesHandlerFactory(logger, cookiePreferencesTableName), | ||
); | ||
|
||
export const handler: Handler = sentryWrapper(getCookiePreferencesHandler); |
14 changes: 14 additions & 0 deletions
14
apps/crn-server/src/handlers/cookie-preferences/save-cookie-preferences-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* istanbul ignore file */ | ||
import { saveCookiePreferencesHandlerFactory } from '@asap-hub/server-common'; | ||
import { framework as lambda } from '@asap-hub/services-common'; | ||
import { Handler } from 'aws-lambda'; | ||
|
||
import { cookiePreferencesTableName } from '../../config'; | ||
import logger from '../../utils/logger'; | ||
import { sentryWrapper } from '../../utils/sentry-wrapper'; | ||
|
||
export const saveCookiePreferencesHandler = lambda.http( | ||
saveCookiePreferencesHandlerFactory(logger, cookiePreferencesTableName), | ||
); | ||
|
||
export const handler: Handler = sentryWrapper(saveCookiePreferencesHandler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
apps/gp2-server/src/handlers/cookie-preferences/get-cookie-preferences-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* istanbul ignore file */ | ||
import { getCookiePreferencesHandlerFactory } from '@asap-hub/server-common'; | ||
import { framework as lambda } from '@asap-hub/services-common'; | ||
import { Handler } from 'aws-lambda'; | ||
|
||
import { cookiePreferencesTableName } from '../../config'; | ||
import logger from '../../utils/logger'; | ||
import { sentryWrapper } from '../../utils/sentry-wrapper'; | ||
|
||
export const getCookiePreferencesHandler = lambda.http( | ||
getCookiePreferencesHandlerFactory(logger, cookiePreferencesTableName), | ||
); | ||
|
||
export const handler: Handler = sentryWrapper(getCookiePreferencesHandler); |
14 changes: 14 additions & 0 deletions
14
apps/gp2-server/src/handlers/cookie-preferences/save-cookie-preferences-handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* istanbul ignore file */ | ||
import { saveCookiePreferencesHandlerFactory } from '@asap-hub/server-common'; | ||
import { framework as lambda } from '@asap-hub/services-common'; | ||
import { Handler } from 'aws-lambda'; | ||
|
||
import { cookiePreferencesTableName } from '../../config'; | ||
import logger from '../../utils/logger'; | ||
import { sentryWrapper } from '../../utils/sentry-wrapper'; | ||
|
||
export const saveCookiePreferencesHandler = lambda.http( | ||
saveCookiePreferencesHandlerFactory(logger, cookiePreferencesTableName), | ||
); | ||
|
||
export const handler: Handler = sentryWrapper(saveCookiePreferencesHandler); |
Oops, something went wrong.