import { Request , Response } from "express" ; import { Main } from "../../../../Main" ; import { Bridge } from "../../../../bridging" ; import { LogService } from "matrix-bot-sdk" ; import { MCEvents } from "../../../../minecraft" ; param { Request } req param { Response } res returns { Promise < void > } export async function postJoin ( req , res ) { const main = req [ 'main' ] ; const bridge = req [ 'bridge' ] ; const id = req [ 'id' ] ; const body = req . body ; const playerRaw = body . player ; const player = await main . players . getPlayer ( playerRaw . name , playerRaw . uuid ) ; const mcJoin = { player } ; await main . joinToMatrix ( bridge , mcJoin ) ; res . status ( 200 ) ; res . end ( ) ; LogService . info ( 'marco-webserver' , `Request ${ id }` , '- Finished.' ) ; }