aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/middleware/oembed.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-05-31 06:10:51 +0300
committerGravatar Vitaly Takmazov2023-05-31 06:11:05 +0300
commitf2a7ea3af919548d41383734e8a3667086a44bcc (patch)
treee0d9db07956f10ccc4e27fc9e0d45d88950dbfbb /vnext/server/middleware/oembed.js
parent395185d093b2d6bb46d02830088e00a3a2ca20c1 (diff)
eslint: enforce semicolons only before statement continuation chars
Diffstat (limited to 'vnext/server/middleware/oembed.js')
-rw-r--r--vnext/server/middleware/oembed.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/vnext/server/middleware/oembed.js b/vnext/server/middleware/oembed.js
index 8b1ed61d..5d062228 100644
--- a/vnext/server/middleware/oembed.js
+++ b/vnext/server/middleware/oembed.js
@@ -1,19 +1,19 @@
-import { embeddedTweet } from '../../src/api';
+import { embeddedTweet } from '../../src/api'
/**
* Return content for embedding
* @type {import('express').RequestParamHandler}
*/
const oembed = async (req, res) => {
- let url = (req.query.url || '').toString();
+ let url = (req.query.url || '').toString()
return embeddedTweet(url).then(result => {
- res.send(result);
- res.end();
+ res.send(result)
+ res.end()
}).catch(err => {
- console.log(`HTTP ${err.response ? err.response.status : err.code}: ${url}`);
- res.sendStatus(err.response ? err.response.status : 500);
- res.end();
- });
-};
+ console.log(`HTTP ${err.response ? err.response.status : err.code}: ${url}`)
+ res.sendStatus(err.response ? err.response.status : 500)
+ res.end()
+ })
+}
-export default oembed;
+export default oembed