Merge remote-tracking branch 'origin/api-v1.11.0' into dev
This commit is contained in:
commit
a72dc00d0c
7 changed files with 34 additions and 18 deletions
|
|
@ -54,6 +54,7 @@ def __create(tenant_id, name):
|
|||
|
||||
|
||||
def get_projects(tenant_id, recording_state=False, gdpr=None, recorded=False, stack_integrations=False):
|
||||
stack_integrations = False
|
||||
with pg_client.PostgresClient() as cur:
|
||||
extra_projection = ""
|
||||
extra_join = ""
|
||||
|
|
|
|||
|
|
@ -663,12 +663,6 @@ async def mobile_signe(projectId: int, sessionId: int, data: schemas.MobileSignP
|
|||
return {"data": mobile.sign_keys(project_id=projectId, session_id=sessionId, keys=data.keys)}
|
||||
|
||||
|
||||
@public_app.post('/signup', tags=['signup'])
|
||||
@public_app.put('/signup', tags=['signup'])
|
||||
async def signup_handler(data: schemas.UserSignupSchema = Body(...)):
|
||||
return signup.create_step1(data)
|
||||
|
||||
|
||||
@app.post('/projects', tags=['projects'])
|
||||
async def create_project(data: schemas.CreateProjectSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from starlette.responses import RedirectResponse, FileResponse
|
|||
|
||||
import schemas
|
||||
from chalicelib.core import sessions, errors, errors_viewed, errors_favorite, sessions_assignments, heatmaps, \
|
||||
sessions_favorite, assist, sessions_notes, click_maps, sessions_replay
|
||||
sessions_favorite, assist, sessions_notes, click_maps, sessions_replay, signup
|
||||
from chalicelib.core import sessions_viewed
|
||||
from chalicelib.core import tenants, users, projects, license
|
||||
from chalicelib.core import webhook
|
||||
|
|
@ -27,6 +27,13 @@ async def get_all_signup():
|
|||
"edition": license.EDITION}}
|
||||
|
||||
|
||||
if not tenants.tenants_exists(use_pool=False):
|
||||
@public_app.post('/signup', tags=['signup'])
|
||||
@public_app.put('/signup', tags=['signup'])
|
||||
async def signup_handler(data: schemas.UserSignupSchema = Body(...)):
|
||||
return signup.create_step1(data)
|
||||
|
||||
|
||||
@app.get('/account', tags=['accounts'])
|
||||
async def get_account(context: schemas.CurrentContext = Depends(OR_context)):
|
||||
r = users.get(tenant_id=context.tenant_id, user_id=context.user_id)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ def __create(tenant_id, name):
|
|||
|
||||
|
||||
def get_projects(tenant_id, recording_state=False, gdpr=None, recorded=False, stack_integrations=False, user_id=None):
|
||||
stack_integrations = False
|
||||
with pg_client.PostgresClient() as cur:
|
||||
role_query = """INNER JOIN LATERAL (SELECT 1
|
||||
FROM users
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from starlette.responses import RedirectResponse, FileResponse
|
|||
import schemas
|
||||
import schemas_ee
|
||||
from chalicelib.core import sessions, assist, heatmaps, sessions_favorite, sessions_assignments, errors, errors_viewed, \
|
||||
errors_favorite, sessions_notes, click_maps, sessions_replay
|
||||
errors_favorite, sessions_notes, click_maps, sessions_replay, signup
|
||||
from chalicelib.core import sessions_viewed
|
||||
from chalicelib.core import tenants, users, projects, license
|
||||
from chalicelib.core import webhook
|
||||
|
|
@ -31,6 +31,13 @@ async def get_all_signup():
|
|||
"edition": license.EDITION}}
|
||||
|
||||
|
||||
if not tenants.tenants_exists(use_pool=False):
|
||||
@public_app.post('/signup', tags=['signup'])
|
||||
@public_app.put('/signup', tags=['signup'])
|
||||
async def signup_handler(data: schemas.UserSignupSchema = Body(...)):
|
||||
return signup.create_step1(data)
|
||||
|
||||
|
||||
@app.get('/account', tags=['accounts'])
|
||||
async def get_account(context: schemas.CurrentContext = Depends(OR_context)):
|
||||
r = users.get(tenant_id=context.tenant_id, user_id=context.user_id)
|
||||
|
|
|
|||
|
|
@ -22,10 +22,18 @@ $$
|
|||
SELECT 'v1.11.0-ee'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
LOCK TABLE ONLY events.inputs IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.inputs
|
||||
ADD COLUMN duration integer NULL,
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY events.clicks IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY public.projects IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE public.projects
|
||||
ALTER COLUMN gdpr SET DEFAULT '{
|
||||
"maskEmails": true,
|
||||
|
|
@ -34,9 +42,4 @@ ALTER TABLE public.projects
|
|||
"defaultInputMode": "obscured"
|
||||
}'::jsonb;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -22,10 +22,18 @@ $$
|
|||
SELECT 'v1.11.0'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
LOCK TABLE ONLY events.inputs IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.inputs
|
||||
ADD COLUMN duration integer NULL,
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY events.clicks IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY public.projects IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE public.projects
|
||||
ALTER COLUMN gdpr SET DEFAULT '{
|
||||
"maskEmails": true,
|
||||
|
|
@ -34,9 +42,4 @@ ALTER TABLE public.projects
|
|||
"defaultInputMode": "obscured"
|
||||
}'::jsonb;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Reference in a new issue