This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File-Location: extensions/endpoints/contact/index.js | |
// Url: https://YOUR_DIRECTUS_URL/contact | |
module.exports = (router, { services, exceptions, getSchema }) => { | |
const { MailService } = services; | |
const { ServiceUnavailableException } = exceptions; | |
const { verify } = require("hcaptcha"); | |
router.post("/", async (req, res) => { | |
if (!req.body.token) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Info: Created without using the extension-sdk */ | |
/* Location: /extensions/hooks/YOUR_HOOK_NAME/index.js */ | |
module.exports = function registerHook( | |
{ action }, | |
{ services, exceptions, logger } | |
) { | |
const { MailService } = services; | |
const { ServiceUnavailableException } = exceptions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Location: /templates/anmeldung_angekommen.liquid --> | |
{% layout "base" %} {% block content %} | |
<p>Hallo,</p> | |
<p> | |
Die Anmeldung von <b>{{ vorname }} {{ nachname }}</b> als | |
<b>{{ rolle }}</b> ist bei uns angekommen. | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Info: Created without using the extension-sdk */ | |
/* Info: For using editable templates i have to mimic the way directus using email templates. */ | |
/* Location: /extensions/hooks/YOUR_HOOK_NAME/index.js */ | |
module.exports = function registerHook( | |
{ action }, | |
{ services, exceptions, logger } | |
) { | |
const { ItemsService, MailService, FilesService } = services; | |
const { ServiceUnavailableException } = exceptions; |