Skip to content

Conversation

RomanBobrovskiy
Copy link
Collaborator

@RomanBobrovskiy RomanBobrovskiy commented Nov 7, 2024

  • added nextjs handler with revalidation logic
  • fixed checkExpiration lambda for checking file expiration
  • updated lambda to push messages into SQS when it those are expired
  • added uploading beanstalk code and version for worker server
  • moved lambdas shared code
  • fixed comparing cdk templates

@RomanBobrovskiy RomanBobrovskiy self-assigned this Nov 7, 2024
*/
export function getCurrentDeviceType(headers: CloudFrontRequest['headers'] | undefined) {
const deviceHeaders = convertCloudFrontHeaders(headers, Object.values(HEADER_DEVICE_TYPE))
if (!deviceHeaders || !Object.keys(deviceHeaders).length) return null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default for string is undefined

* @param headers['last-modified'] - Last-Modified header value
* @returns boolean indicating if the file is expired
*/
function checkFileIsExpired(headers: Record<string, any>): boolean {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: lint warning

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated type

@RomanBobrovskiy RomanBobrovskiy merged commit 6061354 into main Nov 11, 2024
1 check passed
@RomanBobrovskiy RomanBobrovskiy deleted the feat/PLATFORM-1611-api branch November 11, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants