Move User type to own module
This commit is contained in:
parent
59dbce5672
commit
82bb59d6f9
@ -3,6 +3,7 @@ import readline from 'node:readline'
|
||||
import log from './logger'
|
||||
import { whoami } from './synapse'
|
||||
import { storage } from './storage'
|
||||
import { RcUser } from './users'
|
||||
|
||||
log.info('rocketchat2matrix starts.')
|
||||
|
||||
@ -12,14 +13,6 @@ const enum Entities {
|
||||
Messages = 'rocketchat_message.json',
|
||||
}
|
||||
|
||||
type RcUser = {
|
||||
username: string
|
||||
name: string
|
||||
roles: string[]
|
||||
_id: string
|
||||
__rooms: string[]
|
||||
}
|
||||
|
||||
function loadRcExport(entity: Entities): Promise<void> {
|
||||
const rl = readline.createInterface({
|
||||
input: fs.createReadStream(`./inputs/${entity}`, {
|
||||
|
||||
7
src/users.ts
Normal file
7
src/users.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export type RcUser = {
|
||||
username: string
|
||||
name: string
|
||||
roles: string[]
|
||||
_id: string
|
||||
__rooms: string[]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user