Api v1.15.0 (#1619)

* fix(chalice): fixed multi-signups
This commit is contained in:
Kraiem Taha Yassine 2023-11-07 15:15:08 +01:00 committed by GitHub
parent ca29a390c4
commit 1a553134d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -35,6 +35,8 @@ if not tenants.tenants_exists(use_pool=False):
@public_app.put('/signup', tags=['signup'])
def signup_handler(data: schemas.UserSignupSchema = Body(...)):
content = signup.create_tenant(data)
if "errors" in content:
return content
refresh_token = content.pop("refreshToken")
refresh_token_max_age = content.pop("refreshTokenMaxAge")
response = JSONResponse(content=content)

View file

@ -40,6 +40,8 @@ if config("MULTI_TENANTS", cast=bool, default=False) or not tenants.tenants_exis
@public_app.put('/signup', tags=['signup'])
def signup_handler(data: schemas.UserSignupSchema = Body(...)):
content = signup.create_tenant(data)
if "errors" in content:
return content
refresh_token = content.pop("refreshToken")
refresh_token_max_age = content.pop("refreshTokenMaxAge")
response = JSONResponse(content=content)