mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
sending new users to peers on user creation
This commit is contained in:
parent
2f24f214b2
commit
cb0ad03336
9 changed files with 351 additions and 172 deletions
|
@ -12,6 +12,7 @@ import { handleNewDb } from './handlers/handleNewDb'
|
|||
import { handleDbClean } from './handlers/handleDbClean'
|
||||
import { handleQuestionsToPeers } from './handlers/handleQuestionsToPeers'
|
||||
import { handleRmQuestions } from './handlers/handleRmQuestions'
|
||||
import { handleUsersToPeers } from './handlers/handleUsersToPeers'
|
||||
|
||||
export interface WorkerResult {
|
||||
msg: string
|
||||
|
@ -81,6 +82,8 @@ async function handleMessage(
|
|||
await handleRmQuestions(qdbs, msg, workerIndex, setQdbs)
|
||||
} else if (msg.type === 'sendQuestionsToPeers') {
|
||||
await handleQuestionsToPeers(qdbs, msg, workerIndex)
|
||||
} else if (msg.type === 'sendUsersToPeers') {
|
||||
await handleUsersToPeers(qdbs, msg, workerIndex)
|
||||
} else {
|
||||
logger.Log(`Invalid msg type!`, logger.GetColor('redbg'))
|
||||
console.error(msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue