Skip to content

Commit

Permalink
[Fix] Netlify: Move function dependencies to main package.json since …
Browse files Browse the repository at this point in the history
…netlify doesn't want to install these deps when deployed via git push
  • Loading branch information
marcoeh committed Aug 15, 2019
1 parent d8ef06e commit dd3c4f9
Show file tree
Hide file tree
Showing 14 changed files with 372 additions and 491 deletions.
4 changes: 1 addition & 3 deletions components/Example5.vue
Expand Up @@ -25,9 +25,7 @@ export default {
},
async icanhazip() {
try {
const res = await this.$axios.$get(
'/.netlify/functions/icanhazip/icanhazip'
)
const res = await this.$axios.$get('/.netlify/functions/icanhazip')
this.response = res
this.error = null
} catch (e) {
Expand Down
11 changes: 4 additions & 7 deletions components/Example6.vue
Expand Up @@ -48,13 +48,10 @@ export default {
},
async postFormToLambdaFunction() {
try {
const res = await this.$axios.$post(
'/.netlify/functions/mailgun/mailgun',
{
name: this.form.name,
recipient: this.form.email
}
)
const res = await this.$axios.$post('/.netlify/functions/mailgun', {
name: this.form.name,
recipient: this.form.email
})
this.response = res
this.error = null
this.resetForm('mailgunForm')
Expand Down
2 changes: 1 addition & 1 deletion components/Example7.vue
Expand Up @@ -14,7 +14,7 @@ export default {
async sendSlackMessage(name) {
try {
const res = await this.$axios.$post(
'/.netlify/functions/slack-webhook/slack-webhook',
'/.netlify/functions/slack-webhook',
{ name }
)
this.response = res
Expand Down
File renamed without changes.
5 changes: 0 additions & 5 deletions functions/icanhazip/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions functions/icanhazip/yarn.lock

This file was deleted.

File renamed without changes.
5 changes: 0 additions & 5 deletions functions/mailgun/package.json

This file was deleted.

0 comments on commit dd3c4f9

Please sign in to comment.