Versie 0.3.3
This commit is contained in:
1 parent
1cf6eeed29
commit
6e741a51fe
57 files changed
+1362
-2135
No files matched your search
@@ -1,7 +1,8 @@
|
||||
// Generated, do not edit. sha256:ebad02dba29ae50bcbaf9c21bb59936cf43f6be868e86ac00d0e6055f404b26f
|
||||
// Generated, do not edit. sha256:36119ec87b42a3428d74ef9e16a174eb6f028b536ffdcea60da0bd3e970bac77
|
||||
import * as db from '../db.js';
|
||||
import { ACCOUNT_SOURCE_KINDS } from '../../shared/config.js';
|
||||
import { fail } from '../../shared/app-error.js';
|
||||
import { hasFeature } from '../license.mjs';
|
||||
import { eventsNetByAccount } from './events.js';
|
||||
import { trackUpdate, trackUpdateWhere, trackDelete, trackDeleteWhere, withOrigin } from './change-log.js';
|
||||
|
||||
@@ -34,6 +35,7 @@ export function mergeCheck(survivorId, victimId) {
|
||||
}
|
||||
|
||||
export async function mergeAccounts(survivorId, victimId) {
|
||||
if (!hasFeature('accountMerge')) fail('accounts.mergePaid', null, 'Merging accounts belongs to the full edition.');
|
||||
survivorId = Number(survivorId); victimId = Number(victimId);
|
||||
const chk = mergeCheck(survivorId, victimId);
|
||||
if (!chk.ok) fail(`accounts.mergeReason_${chk.reason}`, null, `Merge not possible (${chk.reason}).`);
|
||||
|
||||
Reference in new issue
Block a user