This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d797211
commit cb69766
Showing
14 changed files
with
875 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const zoom = require('express').Router(); | ||
const axios = require('axios'); | ||
|
||
zoom.post('/api', async (req, res) => { | ||
const { apiPath, transcript } = req.body; | ||
if (!apiPath || !transcript) { | ||
return res.status(400).send('Incomplete request: ' + req.body); | ||
} | ||
|
||
axios | ||
.post(apiPath, transcript, { | ||
headers: { 'Content-Type': 'text/plain' }, | ||
}) | ||
.then((response) => { | ||
// Response | ||
console.log(transcript); | ||
console.log(response.status); | ||
res.sendStatus(200); | ||
}) | ||
.catch((e) => { | ||
console.error(e); | ||
res.sendStatus(500); | ||
}); | ||
}); | ||
|
||
module.exports = zoom; |
Oops, something went wrong.