Skip to content

Commit 7d914fe

Browse files
committed
Checkout sign ups
1 parent ffbae38 commit 7d914fe

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

backend/app/modules/access/auth_controller.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def signup(body: UserCreate,
5757
try:
5858
user = create_user(db, body)
5959
except Exception as e:
60-
raise HTTPException(status_code=400, detail="Failed to create user")
60+
raise HTTPException(status_code=400, detail="Failed to create user in database")
6161

6262
if user is None:
6363
raise HTTPException(status_code=400, detail="User already exists")
64-
64+
6565
# Add user to cognito
6666
try:
6767
cognito_client.sign_up(
@@ -73,9 +73,9 @@ def signup(body: UserCreate,
7373
)
7474
except Exception as e:
7575
print(e)
76-
logging.error(f"Failed to create user: {e}")
76+
logging.error(f"Failed to create user in cognito: {e}")
7777
delete_user(db, user.id)
78-
raise HTTPException(status_code=400, detail="Failed to create user")
78+
raise HTTPException(status_code=400, detail="Failed to create user in cognito")
7979

8080
# Add user to group
8181
try:

frontend/cypress/e2e/sign-up.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ describe('Sign Up', () => {
9393
.click();
9494

9595
cy.wait('@signUp').its('request.body').should('deep.equal', user);
96+
// print the response body
97+
cy.wait('@signUp').its('response.body').then(console.log);
9698

9799
cy.url().should('include', `signup/success?email=${user.email}`);
98100
});

frontend/src/services/user.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {api} from './api';
33
export interface UserRole {
44
type: 'guest' | 'host' | 'coordinator' | 'admin';
55
}
6+
67
export interface User {
78
email: string;
89
firstName: string;

0 commit comments

Comments
 (0)