17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
import { EmailAddress, UniqueID } from "@repo/rdx-ddd";
|
|
import type { NextFunction, Response } from "express";
|
|
|
|
import type { RequestWithAuth } from "./auth-types";
|
|
|
|
export function mockUser(req: RequestWithAuth, _res: Response, next: NextFunction) {
|
|
req.user = {
|
|
userId: UniqueID.create("9e4dc5b3-96b9-4968-9490-14bd032fec5f").data,
|
|
email: EmailAddress.create("dev@example.com").data,
|
|
companyId: UniqueID.create("5e4dc5b3-96b9-4968-9490-14bd032fec5f").data,
|
|
companySlug: "acana",
|
|
roles: ["admin"],
|
|
};
|
|
|
|
next();
|
|
}
|