Closed Yohanan-Negash closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/onesignaldevs/ngosi/E6EtjReNEJj2eux4jiUwUFk1Kdb8
✅ Preview: https://ngosi-git-http-status-codes-onesignaldevs.vercel.app
Fixes #15
Solution
Added the http-status-codes package as a dependency and replaced the use of the magic numbers with those status codes.
Testing
dev
branch,git checkout origin/dev
yarn dev
api/survey
, note down the response status code (should be 200)yarn
Resources
HTTPie request to
api/survey
with HTTP request & response.http POST localhost:3000/api/survey Content-Type:plain/text presoShortCode=Zjb4DKO --verbose
References