Skip to content

Commit

Permalink
prune TODO for next PR
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Nov 20, 2022
1 parent 64a467b commit 0f522a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def login(request: web.Request):
"code": LoginCode.PHONE_NUMBER_REQUIRED, # this string is used by the frontend to show phone registration page
"reason": "To login, please register first a phone number",
},
status=web.HTTPAccepted.status_code, # FIXME: error instead?? front-end needs to show a reg
status=web.HTTPAccepted.status_code,
)
return rsp

Expand Down Expand Up @@ -165,7 +165,6 @@ async def login_2fa(request: web.Request):
reason=cfg.MSG_WRONG_2FA_CODE, content_type=MIMETYPE_APPLICATION_JSON
)

# FIXME: ask to register if user not found!!
user = await db.get_user({"email": email})

# dispose since used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

def _get_user_name(email: str) -> str:
username = email.split("@")[0]
# TODO: this has to be unique and add this in user registration!
return username


Expand Down Expand Up @@ -87,7 +86,7 @@ async def register(request: web.Request):
),
"role": USER,
"expires_at": expires_at,
"created_ip": get_client_ip(request), # FIXME: does not get right IP!
"created_ip": get_client_ip(request),
}
)

Expand Down

0 comments on commit 0f522a3

Please sign in to comment.