Skip to content

Commit 4024fd4

Browse files
authored
Merge branch 'development' into patch-1
2 parents 7f25f23 + 84fa2fe commit 4024fd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+3247
-18555
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules/
22
.DS_Store
33
ngrok
44
build/
5-
lambda/
5+
lambda/

netlify-functions/getBlogs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const axios = require("axios");
22
const xml2js = require("xml2js");
33

4-
exports.handler = async (event, context, callback) => {
4+
exports.handler = async () => {
55
const mediumURL = "https://medium.com/feed/codeuino";
66
try {
77
const response = await axios.get(`${mediumURL}`);
88
const data = response.data;
99
xml2js.parseString(data, (err, result) => {
1010
const sendthis = result.rss.channel[0].item.slice(0, 3);
11-
callback(null, {
11+
return ( {
1212
statusCode: 200,
1313
headers: {
1414
"Access-Control-Allow-Origin": "*"

netlify-functions/getLikedTweets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const TwitterAxios = require("../src/helpers/twitterAxios");
22

3-
exports.handler = async (event, context, callback) => {
3+
exports.handler = async () => {
44
try {
55
const likedTweetsResponse = await TwitterAxios.get(
66
"/favorites/list.json?count=50&screen_name=codeuino"
77
);
88

9-
callback(null, {
9+
return ({
1010
statusCode: 200,
1111
headers: {
12-
"Access-Control-Allow-Origin": "*"
12+
"Access-Control-Allow-Origin": '*'
1313
},
1414
body: JSON.stringify(likedTweetsResponse.data)
1515
});

netlify-functions/getTweets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const TwitterAxios = require("../src/helpers/twitterAxios");
22

3-
exports.handler = async (event, context, callback) => {
3+
exports.handler = async () => {
44
try {
55
const allTweetsResponse = await TwitterAxios.get(
66
"/statuses/user_timeline.json?screen_name=codeuino&count=100"
77
);
88

9-
callback(null, {
9+
return ({
1010
statusCode: 200,
1111
headers: {
12-
"Access-Control-Allow-Origin": "*"
12+
"Access-Control-Allow-Origin": '*'
1313
},
1414
body: JSON.stringify(allTweetsResponse.data)
1515
});

0 commit comments

Comments
 (0)