Skip to content

Commit

Permalink
Merge pull request #97 from thematters/fix/ga4
Browse files Browse the repository at this point in the history
fix(ga4): bugfixes
  • Loading branch information
gary02 authored Nov 22, 2023
2 parents 0185d4c + 0e7987d commit d26b7d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deployment/sync-ga-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Resources:
ScheduleExpression: "rate(1 hour)"
Targets:
- Arn: !GetAtt Lambda.Arn
Id: CronEvent2LambdaTarget
Id: CronEvent3LambdaTarget
Input: |
{
"type": "2 days ago"
Expand All @@ -167,7 +167,7 @@ Resources:
ScheduleExpression: "rate(1 hour)"
Targets:
- Arn: !GetAtt Lambda.Arn
Id: CronEvent2LambdaTarget
Id: CronEvent4LambdaTarget
Input: |
{
"type": "3 days ago"
Expand Down
6 changes: 3 additions & 3 deletions lib/ga4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ const pathToId = async (path: string) => {
};

const hashToId = async (hash: string) => {
const res = await knexRO("article")
const res = await knexRO("draft")
.where({ mediaHash: hash })
.select("id")
.select("article_id")
.first();
if (res) {
return res.id;
return res.articleId;
} else {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambda-handlers-image",
"version": "0.8.1",
"version": "0.8.2",
"private": true,
"type": "module",
"scripts": {
Expand Down

0 comments on commit d26b7d2

Please sign in to comment.