Skip to content
This repository was archived by the owner on May 2, 2021. It is now read-only.

Commit 89eb4b5

Browse files
committed
functions folder
1 parent 89b0e8b commit 89eb4b5

File tree

4 files changed

+34
-26
lines changed

4 files changed

+34
-26
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ img/uploads
1212
convert
1313

1414
# Local Netlify folder
15-
.netlify
15+
.netlify
16+
/netlify_functions

netlify_functions/deploy-succeeded.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
"env": {
2626
"serviceworker": true
2727
}
28+
},
29+
{
30+
"files": ["**/netlify_functions/**/*.js"],
31+
"env": {
32+
"node": true
33+
}
2834
}
2935
]
3036
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// const axios = require('axios');
2+
3+
// const { ONE_SIGNAL_API_KEY, ONE_SIGNAL_APP_ID } = process.env;
4+
5+
exports.handler = function (event) {
6+
console.log(event);
7+
// axios.post(
8+
// 'https://onesignal.com/api/v1/notifications',
9+
// {
10+
// included_segments: ['Active Users'],
11+
// app_id: ONE_SIGNAL_APP_ID,
12+
// headings: {
13+
// en: 'Pubblicato un nuovo evento!',
14+
// },
15+
// contents: {
16+
// en: "Titolo dell'evento",
17+
// },
18+
// },
19+
// {
20+
// headers: { Authorization: `Basic ${ONE_SIGNAL_API_KEY}` },
21+
// },
22+
// );
23+
return {
24+
statusCode: 200,
25+
};
26+
};

0 commit comments

Comments
 (0)