Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into send-error-notifica…
Browse files Browse the repository at this point in the history
…tion-#90
  • Loading branch information
jorganisak committed Jul 18, 2020
2 parents ec5bcc2 + 0f2ca7b commit 3835527
Show file tree
Hide file tree
Showing 32 changed files with 5,747 additions and 1,031 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/twilio/node_modules
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
"react/static-property-placement": ["error", "static public field"],
"react/forbid-prop-types": ["off"],
"react/jsx-filename-extension": ["off"],
"react/jsx-wrap-multilines": ["off"],
"react/destructuring-assignment": ["off"],
"react-hooks/rules-of-hooks": ["error"],
"radix": ["off"] //fixed in ES5
Expand Down
3 changes: 3 additions & 0 deletions .twilio-functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"projects": {}
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [0.57.0](https://github.com/crownheightsaid/mutual-aid-app/compare/0.56.0...0.57.0)

> 7 July 2020
- fix: message for DM. approved by intake [`#115`](https://github.com/crownheightsaid/mutual-aid-app/pull/115)
- Display requests marked for driving clusters on /delivery-needed map [`#79`](https://github.com/crownheightsaid/mutual-aid-app/pull/79)
- Remove unmatched reimbursement requests [`#110`](https://github.com/crownheightsaid/mutual-aid-app/pull/110)
- fix: finish package.json merge and lint [`#113`](https://github.com/crownheightsaid/mutual-aid-app/pull/113)
- Create LICENSE [`#112`](https://github.com/crownheightsaid/mutual-aid-app/pull/112)
- added twilio serverless functions! for phone line + sms [`#103`](https://github.com/crownheightsaid/mutual-aid-app/pull/103)
- linter upgrade fixes [`#109`](https://github.com/crownheightsaid/mutual-aid-app/pull/109)
- Update README.md [`bd46dc4`](https://github.com/crownheightsaid/mutual-aid-app/commit/bd46dc4f0d3b5ceed2f54b250988f6775df6c0ba)
- Update DEVELOPING.md [`be8f7ee`](https://github.com/crownheightsaid/mutual-aid-app/commit/be8f7ee4916d88a9ca45d0669a37fc6548b4eefe)
- Update README.md [`7d7c047`](https://github.com/crownheightsaid/mutual-aid-app/commit/7d7c0472c3c565c65f2e0a60dc81ee4fc713a104)
- fix: create delivery reminder message [`35c20ad`](https://github.com/crownheightsaid/mutual-aid-app/commit/35c20adc195ca3f0fc4625cfeb26de99b898e9a5)

#### [0.56.0](https://github.com/crownheightsaid/mutual-aid-app/compare/0.55.0...0.56.0)

> 3 July 2020
- fix: package lock update [`388bb09`](https://github.com/crownheightsaid/mutual-aid-app/commit/388bb09ed1972ef7397bb317a801032e80f8e4c1)
- fix: react-scripts jest depends [`81a4ae5`](https://github.com/crownheightsaid/mutual-aid-app/commit/81a4ae5c86008c4907b1465fd048b1ac65f5b418)
- Release 0.56.0 [`9385eaa`](https://github.com/crownheightsaid/mutual-aid-app/commit/9385eaa099074ee42de4dc0c7ee5b97157603780)

#### [0.55.0](https://github.com/crownheightsaid/mutual-aid-app/compare/0.54.0...0.55.0)

Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project is a monorepo. The different components are:
- `src/api`
- HTTP api that this app provides
- `src/twilio`
- Barebones twilio callbacks for recording a voicemail and creating a new airtable record
- twilio serverless js functions for voice + sms, connecting to airtable; deployed separately
- `src/webapp`
- Frontend for the app, built with React. Built to `/public` in project root
- `src/workers`
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Crown Heights Mutual Aid

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"description": "Go to https://www.twilio.com/console and copy what's under 'AUTH TOKEN'",
"required": false
},
"TWILIO_ACCOUNT_SID": {
"description": "Go to https://www.twilio.com/console and copy what's under 'ACCOUNT SID'",
"required": false
},
"TWILIO_VOICEMAIL_URL": {
"description": "A url to an mp3 to play when someone calls your Twilio number. Twilio lets you host files here: https://www.twilio.com/console/assets/public",
"required": false
Expand Down
18 changes: 1 addition & 17 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ require("~strings/i18nextInit");
const path = require("path");
const express = require("express");
const morgan = require("morgan");
const twilio = require("twilio");
const basicAuth = require("express-basic-auth");
const bodyParser = require("body-parser");
const airtableWorker = require("./src/workers/airtable-sync/worker");
Expand Down Expand Up @@ -52,24 +51,9 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

// ==================================================================
// Twilio Webhooks
// Twilio Functions: written separately, deployed as serverless functions in src/twilio subpackage
// ==================================================================

if (process.env.TWILIO_AUTH_TOKEN) {
app.post(
"/twilio/call-handler",
twilio.webhook({ protocol: "https" }),
require("./src/twilio/callHandler.js")
);
app.post(
"/twilio/call-handler-callback",
twilio.webhook({ protocol: "https" }),
require("./src/twilio/callHandlerCallback.js")
);
} else {
console.log("TWILIO_AUTH_TOKEN not set. Twilio callbacks not enabled.");
}

// ==================================================================
// API Routes
// ==================================================================
Expand Down
Loading

0 comments on commit 3835527

Please sign in to comment.