diff --git a/api/controllers/push.js b/api/controllers/push.js new file mode 100644 index 0000000..09add0b --- /dev/null +++ b/api/controllers/push.js @@ -0,0 +1,33 @@ +module.exports = { + + + friendlyName: 'Push Notification', + + + description: 'Notify.', + + + inputs: { + message: { + type: 'json' + } + }, + + + exits: { + + }, + + + fn: async function (inputs, exits) { + + if (inputs.message) + console.log(inputs.message); + else console.log("No message specified"); + + return exits.success({ url: "//hamo.com" }); + + } + + +}; diff --git a/assets/google65607aa129b18fc0.html b/assets/google65607aa129b18fc0.html new file mode 100644 index 0000000..dcc02cb --- /dev/null +++ b/assets/google65607aa129b18fc0.html @@ -0,0 +1 @@ +google-site-verification: google65607aa129b18fc0.html \ No newline at end of file diff --git a/config/routes.js b/config/routes.js index 9e5fac7..9e3ed2c 100644 --- a/config/routes.js +++ b/config/routes.js @@ -38,7 +38,9 @@ module.exports.routes = { * not match any of those, it is matched against static assets. * * * ***************************************************************************/ - + '/pushnotifications': { + action: 'push' + }, // ╔═╗╔═╗╦ ╔═╗╔╗╔╔╦╗╔═╗╔═╗╦╔╗╔╔╦╗╔═╗ // ╠═╣╠═╝║ ║╣ ║║║ ║║╠═╝║ ║║║║║ ║ ╚═╗