idz: Plumb clientHello into request dispatcher
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user