Skip to content

Commit

Permalink
Fix CTA not showing in post details
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed Apr 23, 2024
1 parent 8c39f74 commit 668117a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-backend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: DeployBackendDev
on:
push:
branches:
- "master"
- "implement-get-apis-for-post"

jobs:
deploy-backend-dev:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/deploy-frontend-dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: DeployFrontendServerlessDev

on:
workflow_run:
workflows: ["DeployBackendDev"]
types:
- completed
push:
branches:
- "master"
- "implement-get-apis-for-post"

jobs:
deploy-frontend-dev:
Expand Down
10 changes: 8 additions & 2 deletions db/blog_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ func NewBlogSql() *sqlx.DB {
name = "canopas_website"
}

var db *sqlx.DB
sslmode := "require"

if os.Getenv("DB_ENV") == "test" {
sslmode = "disable"
}

db, err := sqlx.Open("postgres", "postgres://"+username+":"+password+"@"+host+":"+port+"/"+name)
var db *sqlx.DB

db, err := sqlx.Open("postgres", "postgres://"+username+":"+password+"@"+host+":"+port+"/"+name+"?sslmode="+sslmode)
if err != nil {
fmt.Println("Error while connecting to the blog database: ", err)
}
Expand Down
4 changes: 2 additions & 2 deletions nuxt-frontend/pages/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ if (status.value !== config.SUCCESS) {
published_time = new Date(post.value?.published_on).toLocaleTimeString();
}
const CTAData = post.value?.cta?.data;
CTACompName.value = CTAData?.attributes.component_name;
const CTAData = post.value?.cta;
CTACompName.value = CTAData?.component_name;
useHead({
script: [
Expand Down

0 comments on commit 668117a

Please sign in to comment.