Move handlers and clean up

This commit is contained in:
Henrik Hüttemann
2023-06-07 18:23:20 +02:00
parent ae3353c6cb
commit 4692c7edea
7 changed files with 30 additions and 15 deletions
+3 -3
View File
@@ -4,10 +4,10 @@ import lineByLine from 'n-readlines'
import 'reflect-metadata'
import { IdMapping } from './entity/IdMapping'
import { Membership } from './entity/Membership'
import { RcUser, createUser } from './handlers/users'
import log from './helpers/logger'
import { getMapping, initStorage, save } from './helpers/storage'
import { whoami } from './helpers/synapse'
import { RcUser, createUser } from './users'
import { getMapping, save, setMapping } from './helpers/storage'
log.info('rocketchat2matrix starts.')
@@ -101,7 +101,7 @@ async function loadRcExport(entity: Entities) {
async function main() {
try {
await whoami()
await AppDataSource.initialize()
await initStorage()
await loadRcExport(Entities.Users)
log.info('Done.')
} catch (error) {