Skip to content

Commit

Permalink
Merge pull request #31 from wilburx9/develop
Browse files Browse the repository at this point in the history
Fixed Github workflow
  • Loading branch information
wilburx9 authored Jan 28, 2024
2 parents 8666937 + 7da72f1 commit 9b5551b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy the AWS Lambdas

on:
push:
pull_request:
branches:
- 'live'
paths:
Expand All @@ -15,12 +15,12 @@ jobs:
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: 1.21.x

- name: Build subscribe function
working-directory: backend
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy the Ghost theme

on:
push:
pull_request:
branches:
- 'live'
paths:
Expand All @@ -15,7 +15,7 @@ jobs:
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
working-directory: frontend
Expand Down
5 changes: 1 addition & 4 deletions backend/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ func processBroadcastRequest(ctx context.Context, body string) (int, string) {
return http.StatusBadRequest, err.Error()
}

// 1. To prevent sending notification for drafts, confirm this post is published.
// 2. To prevent sending emails for unpublished and republished posts, ensure
// that the diff b/w publication and updated dates is not more than 30 minutes.
if !reqData.canBroadcast() {
return http.StatusBadRequest, fmt.Sprintf(
"this post is too old to be rescheduled. It was created at %v and updated at %v ",
"this post is too old to be scheduled. It was created at %v and updated at %v ",
reqData.Post.Current.PublishedAt,
reqData.Post.Current.UpdatedAt,
)
Expand Down

0 comments on commit 9b5551b

Please sign in to comment.