mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 15:25:57 +00:00
Parameterize emails in backend
This commit is contained in:
parent
063200bcb1
commit
16c7be1cc4
@ -24,3 +24,6 @@ AWS_SECRET_ACCESS_KEY=
|
||||
AWS_ENDPOINT=
|
||||
AWS_REGION=
|
||||
AWS_BUCKET=
|
||||
|
||||
EMAIL_DEFAULT_SENDER="info@human-connection.org"
|
||||
EMAIL_SUPPORT="support@human-connection.org"
|
||||
|
||||
@ -45,7 +45,7 @@ export async function handler(req, res) {
|
||||
} catch (error) {
|
||||
debug(error)
|
||||
return res.status(500).json({
|
||||
error: 'Something went terribly wrong. Please contact support@human-connection.org',
|
||||
error: `Something went terribly wrong. Please contact ${CONFIG.EMAIL_SUPPORT}`,
|
||||
})
|
||||
} finally {
|
||||
session.close()
|
||||
|
||||
@ -36,6 +36,8 @@ const {
|
||||
REDIS_DOMAIN,
|
||||
REDIS_PORT,
|
||||
REDIS_PASSWORD,
|
||||
EMAIL_DEFAULT_SENDER,
|
||||
EMAIL_SUPPORT,
|
||||
} = env
|
||||
|
||||
export const requiredConfigs = {
|
||||
@ -88,6 +90,11 @@ export const s3Configs = {
|
||||
S3_CONFIGURED,
|
||||
}
|
||||
|
||||
export const customConfigs = {
|
||||
EMAIL_DEFAULT_SENDER,
|
||||
EMAIL_SUPPORT,
|
||||
}
|
||||
|
||||
export default {
|
||||
...requiredConfigs,
|
||||
...smtpConfigs,
|
||||
@ -97,4 +104,5 @@ export default {
|
||||
...sentryConfigs,
|
||||
...redisConfigs,
|
||||
...s3Configs,
|
||||
...customConfigs,
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ import CONFIG from '../../config'
|
||||
|
||||
import * as templates from './templates'
|
||||
|
||||
const from = '"Human Connection" <info@human-connection.org>'
|
||||
const from = CONFIG.EMAIL_DEFAULT_SENDER
|
||||
const supportUrl = 'https://human-connection.org/en/contact'
|
||||
|
||||
export const signupTemplate = ({ email, nonce }) => {
|
||||
|
||||
@ -45,6 +45,8 @@ services:
|
||||
- MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ
|
||||
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
|
||||
- "DEBUG=${DEBUG}"
|
||||
- EMAIL_SUPPORT=support@human-connection.org
|
||||
- EMAIL_DEFAULT_SENDER=info@human-connection.org
|
||||
neo4j:
|
||||
image: schoolsinmotion/neo4j:latest
|
||||
build:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user