Skip to content

Commit 488f0df

Browse files
committed
removed comments. added package
1 parent f80c958 commit 488f0df

File tree

3 files changed

+350
-13
lines changed

3 files changed

+350
-13
lines changed

src/http/post-groot/index.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ exports.handler = async function http(req) {
77
let body = parseBody(req);
88
try {
99
let url = body.url;
10-
11-
// 4. Check if the URL contains a video
12-
// Getting the Tweet Path
13-
1410
const tweetPath = parse(url).pathname.split("/")[3];
15-
16-
// 5. Prepare api request url
1711
const requestUrl = `https://api.twitter.com/1.1/statuses/show.json?id=${tweetPath}&tweet_mode=extended`;
1812

1913
let data;
@@ -37,19 +31,12 @@ exports.handler = async function http(req) {
3731
} catch (e) {
3832
console.error("error message", e.message);
3933

40-
// returning the error
4134
return {
4235
headers: {
4336
"content-type": "application/json; charset=utf8",
4437
},
4538
body: JSON.stringify(e.message),
4639
statusCode: 400,
4740
};
48-
} finally {
49-
// Save data in db here
50-
// table = requests
51-
// key = date
52-
// prop = total number of requests today
53-
// value = number of requests today
5441
}
5542
};

0 commit comments

Comments
 (0)