Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	serverless.yml
  • Loading branch information
shalvah committed Sep 5, 2023
2 parents efa7359 + b9522ab commit a2ea9bf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 74 deletions.
6 changes: 6 additions & 0 deletions homepage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

const {http} = require("./src/utils");

module.exports.getHomePage = async (event, context) => {
return http.renderHtml('home');
};
81 changes: 10 additions & 71 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ provider:
- "*"

environment:
TWITTER_CONSUMER_KEY: ${env:TWITTER_CONSUMER_KEY}
TWITTER_CONSUMER_SECRET: ${env:TWITTER_CONSUMER_SECRET}
TWITTER_ACCESS_TOKEN: ${env:TWITTER_ACCESS_TOKEN}
TWITTER_ACCESS_TOKEN_SECRET: ${env:TWITTER_ACCESS_TOKEN_SECRET}
TWITTER_SCREEN_NAME: RemindMe_OfThis
TWITTER_CALLBACK_URL: ${env:TWITTER_CALLBACK_URL}
REDIS_HOSTNAME: ${env:REDIS_HOSTNAME}
REDIS_PORT: ${env:REDIS_PORT}
REDIS_PASSWORD: ${env:REDIS_PASSWORD}
# TWITTER_CONSUMER_KEY: ${env:TWITTER_CONSUMER_KEY}
# TWITTER_CONSUMER_SECRET: ${env:TWITTER_CONSUMER_SECRET}
# TWITTER_ACCESS_TOKEN: ${env:TWITTER_ACCESS_TOKEN}
# TWITTER_ACCESS_TOKEN_SECRET: ${env:TWITTER_ACCESS_TOKEN_SECRET}
# TWITTER_SCREEN_NAME: RemindMe_OfThis
# TWITTER_CALLBACK_URL: ${env:TWITTER_CALLBACK_URL}
# REDIS_HOSTNAME: ${env:REDIS_HOSTNAME}
# REDIS_PORT: ${env:REDIS_PORT}
# REDIS_PASSWORD: ${env:REDIS_PASSWORD}
LAMBDA_FUNCTION_NAME: ${env:LAMBDA_FUNCTION_NAME}
LAMBDA_FUNCTION_ARN: ${env:LAMBDA_FUNCTION_ARN}
EXTERNAL_URL: ${env:EXTERNAL_URL}
Expand All @@ -61,70 +61,9 @@ package:
- "!awscli-bundle/**"

functions:
handleAccountActivity:
handler: handler.handleAccountActivity
timeout: 50
events:
- http:
path: /webhook
method: post

handleTwitterCrc:
handler: handler.handleTwitterCrc
events:
- http:
path: /webhook
method: get

checkForRemindersAndSend:
handler: handler.checkForRemindersAndSend
timeout: 60
events:
- schedule: rate(1 minute)

getHomePage:
handler: handler.getHomePage
handler: homepage.getHomePage
events:
- http:
path: /
method: get

getPage:
handler: handler.getPage
events:
- http:
path: /{page}
method: get
request:
parameters:
paths:
page: true

startTwitterSignIn:
handler: handler.startTwitterSignIn
events:
- http:
path: /_/starttwittersignin
method: get

completeTwitterSignIn:
handler: handler.completeTwitterSignIn
events:
- http:
path: /_/completetwittersignin
method: get

updateSettings:
handler: handler.updateSettings
events:
- http:
path: /_/updatesettings
method: post

retryFailedTasks:
handler: handler.retryFailedTasks

# Deprecated. If you're deploying as a new service, you should remove this function.
# Previously, reminders were done by scheduling an execution of this function. Now they're done by polling Redis.
remind:
handler: handler.remind
8 changes: 5 additions & 3 deletions views/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@

<div class="content">

<div style="text-align: right; padding-right: 70px;">
<a href='/settings'>Sign in with Twitter</a>
<div style="padding-right: 70px;">
😢 As of July 2023, @RemindMe_OfThis no longer works, thanks to the Twitter API changes.
It's been a fun 4.5 years.
<hr>
</div>
<h1 style="color: cornflowerblue">Set reminders for anything with a Tweet.</h1>
</div>
Expand Down Expand Up @@ -140,4 +142,4 @@ <h3>And get notified when it's time, via Twitter:</h3>
</div>
</footer>

</body>
</body>

0 comments on commit a2ea9bf

Please sign in to comment.