Skip to content

Commit 8e637c1

Browse files
authored
Merge pull request #411 from Ketteiteki/remove_registration_checkbox
remove registration checkbox
2 parents 7a0c93e + 3fb6e14 commit 8e637c1

7 files changed

Lines changed: 5 additions & 37 deletions

File tree

MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ namespace MangoAPI.BusinessLogic.ApiCommands.Users;
66
public record RegisterCommand(
77
string Email,
88
string DisplayName,
9-
string Password,
10-
bool TermsAccepted)
9+
string Password)
1110
: IRequest<Result<TokensResponse>>;

MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandValidator.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@ public RegisterCommandValidator()
2121
RuleFor(x => x.DisplayName)
2222
.NotEmpty()
2323
.Length(1, 50);
24-
25-
RuleFor(x => x.TermsAccepted).Equal(true);
2624
}
2725
}

MangoAPI.BusinessLogic/ApiCommands/Users/RegisterRequest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ public record RegisterRequest
99
public RegisterRequest(
1010
string email,
1111
string displayName,
12-
string password,
13-
bool termsAccepted)
12+
string password)
1413
{
1514
Email = email;
1615
DisplayName = displayName;
1716
Password = password;
18-
TermsAccepted = termsAccepted;
1917
}
2018

2119
[DefaultValue("test@gmail.com")]
@@ -26,7 +24,4 @@ public RegisterRequest(
2624

2725
[DefaultValue("x[?6dME#xrp=nr7q")]
2826
public string Password { get; }
29-
30-
[DefaultValue(true)]
31-
public bool TermsAccepted { get; }
3227
}

MangoAPI.Client/src/app/components/register/register.component.html

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,6 @@ <h4 class="mb-4 text-center">We are Different, We Make You Different.</h4>
3333
[(ngModel)]="registerCommand.password"
3434
/>
3535

36-
<p class="justify-content-end">*any 8 chars</p>
37-
38-
<div class="d-inline-flex flex-row">
39-
<label for="termsAccepted"></label>
40-
<input
41-
class="terms-of-service"
42-
id="termsAccepted"
43-
name="termsAccepted"
44-
type="checkbox"
45-
[(ngModel)]="registerCommand.termsAccepted"
46-
/>
47-
<p class="text-nowrap">I accept terms of service</p>
48-
</div>
49-
5036
<button class="form-button p-3 font-weight-bold mb-3" (click)="onRegisterClick()">
5137
REGISTER
5238
</button>

MangoAPI.Client/src/app/components/register/register.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class RegisterComponent implements OnDestroy {
2525
displayName: '',
2626
email: '',
2727
password: '',
28-
termsAccepted: false
2928
};
3029

3130
componentDestroyed$: Subject<boolean> = new Subject();
@@ -61,11 +60,6 @@ export class RegisterComponent implements OnDestroy {
6160
return;
6261
}
6362

64-
if (!this.registerCommand.termsAccepted) {
65-
alert('Terms not accepted');
66-
return;
67-
}
68-
6963
this._usersService
7064
.createUser(this.registerCommand)
7165
.pipe(takeUntil(this.componentDestroyed$))

MangoAPI.Client/src/app/types/requests/RegisterCommand.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
email: string;
33
displayName: string;
44
password: string;
5-
termsAccepted: boolean;
65

7-
constructor(email: string, displayName: string, password: string, termsAccepted: boolean) {
6+
constructor(email: string, displayName: string, password: string) {
87
this.email = email;
98
this.displayName = displayName;
109
this.password = password;
11-
this.termsAccepted = termsAccepted;
1210
}
1311
}

MangoAPI.IntegrationTests/Helpers/CommandHelper.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public static RegisterCommand RegisterKhachaturCommand()
1717
var command = new RegisterCommand(
1818
Email: "xachulxx@gmail.com",
1919
DisplayName: "Khachatur Khachatryan",
20-
Password: "Bm3-`dPRv-/w#3)cw^97",
21-
TermsAccepted: true);
20+
Password: "Bm3-`dPRv-/w#3)cw^97");
2221

2322
return command;
2423
}
@@ -28,8 +27,7 @@ public static RegisterCommand RegisterPetroCommand()
2827
var command = new RegisterCommand(
2928
Email: "kolosovp95@gmail.com",
3029
DisplayName: "Petro Kolosov",
31-
Password: "Bm3-`dPRv-/w#3)cw^97",
32-
TermsAccepted: true);
30+
Password: "Bm3-`dPRv-/w#3)cw^97");
3331

3432
return command;
3533
}

0 commit comments

Comments
 (0)