Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libs/server/api/src/lib/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ export class UserController {
return this.user.finishJoyride(token);
}

@Post('viewedAccountSetupPage')
async viewedAccountSetupPage(
@Body(QUERY_KEY, new QueryValidationPipe({})) _: IQuery<{}>,
@Headers(TOKEN_KEY) token: string
) {
return this.user.viewedAccountSetupPage(token);
}

@Post('adminUserSearch')
async adminUserSearch(
@Body(QUERY_KEY, new QueryValidationPipe(UserQuery)) query: IQuery<User[]>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ export class UserService {
return this.userRepo.update(user.id, { joyride: false });
}


async viewedAccountSetupPage(token: string) {
const user = await this.auth.validateUserToken(token);
return this.userRepo.update(user.id, { actionedOnAccountSetup: true });
}

private addUserToMailChimpGeneralAudience(email: string) {
// User must update their email preferences with MailChimp profile information
const mailchimpInstance = 'The Instance';
Expand Down
3 changes: 3 additions & 0 deletions libs/server/core/domain-services/src/lib/user/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export class UserEntity implements Required<User> {
@Column({ default: false })
baAdmin!: boolean;

@Column({ default: false })
actionedOnAccountSetup!: boolean;

@OneToOne(() => ChangeMakerEntity, (e) => e.user, { nullable: true })
@JoinColumn()
changeMaker!: ChangeMakerEntity;
Expand Down