Add an SQL DB abstraction layer
Because what self-respecting Enterprise(R) project doesn't have one of those?
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Team } from "../model/team";
|
||||
import { Repositories } from "../repo";
|
||||
import { Id } from "../../db";
|
||||
import { Id } from "../../sql";
|
||||
|
||||
// Bleh. This factorization is kind of messy.
|
||||
|
||||
|
||||
@@ -43,11 +43,15 @@ import { updateUserLog } from "./updateUserLog";
|
||||
import { Request } from "../request";
|
||||
import { Response } from "../response";
|
||||
import { Repositories } from "../repo";
|
||||
import { Transaction } from "../../sql";
|
||||
import { SqlRepositories } from "../db";
|
||||
|
||||
export async function dispatch(
|
||||
w: Repositories,
|
||||
txn: Transaction,
|
||||
req: Request
|
||||
): Promise<Response> {
|
||||
const w = new SqlRepositories(txn);
|
||||
|
||||
switch (req.type) {
|
||||
case "check_team_name_req":
|
||||
return checkTeamName(w, req);
|
||||
|
||||
Reference in New Issue
Block a user