mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Settings Cache Refactor
This commit is contained in:
@@ -36,10 +36,10 @@ module.exports = connectors => {
|
||||
const {
|
||||
organizationName,
|
||||
organizationContactEmail,
|
||||
} = await Settings.load([
|
||||
} = await Settings.select(
|
||||
'organizationName',
|
||||
'organizationContactEmail',
|
||||
]);
|
||||
'organizationContactEmail'
|
||||
);
|
||||
|
||||
// rescheduledDeletionDate is the date in the future that we'll set the
|
||||
// user's account to be deleted on if this delete fails.
|
||||
|
||||
@@ -81,7 +81,7 @@ async function sendDownloadLink(ctx) {
|
||||
// Generate the download links.
|
||||
const { downloadLandingURL } = await generateDownloadLinks(ctx, user.id);
|
||||
|
||||
const { organizationName } = await Settings.load('organizationName');
|
||||
const { organizationName } = await Settings.select('organizationName');
|
||||
|
||||
// Send the download link via the user's attached email account.
|
||||
await Users.sendEmail(user, {
|
||||
@@ -130,7 +130,7 @@ async function requestDeletion({
|
||||
}
|
||||
);
|
||||
|
||||
const { organizationName } = await Settings.load('organizationName');
|
||||
const { organizationName } = await Settings.select('organizationName');
|
||||
|
||||
// Send the download link via the user's attached email account.
|
||||
await Users.sendEmail(user, {
|
||||
@@ -171,7 +171,7 @@ async function cancelDeletion({
|
||||
{ $unset: { 'metadata.scheduledDeletionDate': 1 } }
|
||||
);
|
||||
|
||||
const { organizationName } = await Settings.load('organizationName');
|
||||
const { organizationName } = await Settings.select('organizationName');
|
||||
|
||||
// Send the download link via the user's attached email account.
|
||||
await Users.sendEmail(user, {
|
||||
|
||||
Reference in New Issue
Block a user