mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-25 16:20:19 -05:00
idz: Plumb clientHello into request dispatcher
This commit is contained in:
parent
b606af53a1
commit
0a46774634
|
|
@ -42,10 +42,12 @@ import { updateUserLog } from "./updateUserLog";
|
|||
import { Repositories } from "../repo";
|
||||
import { Request } from "../request";
|
||||
import { Response } from "../response";
|
||||
import { ClientHello } from "../../common";
|
||||
|
||||
export async function dispatch(
|
||||
w: Repositories,
|
||||
req: Request
|
||||
req: Request,
|
||||
clientHello: ClientHello
|
||||
): Promise<Response> {
|
||||
switch (req.type) {
|
||||
case "check_team_name_req":
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default function idz(db: DataSource) {
|
|||
|
||||
for await (const req of readRequestStream(clientHello, aesStream)) {
|
||||
const res = await db.transaction(txn =>
|
||||
dispatch(new SqlRepositories(txn), req)
|
||||
dispatch(new SqlRepositories(txn), req, clientHello)
|
||||
);
|
||||
|
||||
await aesStream.write(writeResponse(res, clientHello));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user