replace underscore with our own

we only need like 5 simple functions
This commit is contained in:
Girish Ramakrishnan
2025-02-13 14:03:25 +01:00
parent c46c41db5a
commit dd5e4adc73
25 changed files with 111 additions and 65 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ const assert = require('assert'),
shell = require('./shell.js')('mail'),
superagent = require('superagent'),
validator = require('validator'),
_ = require('underscore');
_ = require('./underscore.js');
const DNS_OPTIONS = { timeout: 10000 };
const REMOVE_MAILBOX_CMD = path.join(__dirname, 'scripts/rmmailbox.sh');
@@ -788,7 +788,7 @@ async function clearDomains() {
// remove all fields that should never be sent out via REST API
function removePrivateFields(domain) {
const result = _.pick(domain, 'domain', 'enabled', 'mailFromValidation', 'catchAll', 'relay', 'banner');
const result = _.pick(domain, ['domain', 'enabled', 'mailFromValidation', 'catchAll', 'relay', 'banner']);
if (result.relay.provider !== 'cloudron-smtp') {
if (result.relay.username === result.relay.password) result.relay.username = constants.SECRET_PLACEHOLDER;
result.relay.password = constants.SECRET_PLACEHOLDER;