refactor: strip Phase/Plan/R-number references from source comments
This commit is contained in:
@@ -39,12 +39,16 @@ export const signUpUseCase =
|
||||
bus: EventBusProtocol | undefined,
|
||||
) =>
|
||||
async (input: SignUpInput): Promise<SignUpOutput> => {
|
||||
const existingUser = await usersRepository.getUserByUsername(input.username);
|
||||
const existingUser = await usersRepository.getUserByUsername(
|
||||
input.username,
|
||||
);
|
||||
if (existingUser) {
|
||||
throw new AuthenticationError("Username taken");
|
||||
}
|
||||
|
||||
const passwordHash = await authenticationService.hashPassword(input.password);
|
||||
const passwordHash = await authenticationService.hashPassword(
|
||||
input.password,
|
||||
);
|
||||
const userId = authenticationService.generateUserId();
|
||||
|
||||
const newUser = await usersRepository.createUser({
|
||||
@@ -53,11 +57,12 @@ export const signUpUseCase =
|
||||
passwordHash,
|
||||
});
|
||||
|
||||
const { cookie, session } = await authenticationService.createSession(newUser);
|
||||
const { cookie, session } =
|
||||
await authenticationService.createSession(newUser);
|
||||
|
||||
// Auth is username-based — synthesize a deterministic email so the event
|
||||
// payload validates against userSignedUpEventSchema.email().
|
||||
// bus is optional: absent when core-events is not wired (Phase 3+).
|
||||
// bus is optional: absent when core-events is not wired.
|
||||
if (bus) {
|
||||
await bus.publish(userSignedUpEvent, {
|
||||
userId: newUser.id,
|
||||
|
||||
Reference in New Issue
Block a user