mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init easy backend install from cli
This commit is contained in:
parent
5c7c405e41
commit
a6742d17c1
9 changed files with 134 additions and 55 deletions
|
|
@ -3,7 +3,6 @@ from src.db.install import InstallRead
|
|||
from src.core.events.database import get_db_session
|
||||
from src.db.organizations import OrganizationCreate
|
||||
from src.db.users import UserCreate
|
||||
|
||||
from src.services.install.install import (
|
||||
create_install_instance,
|
||||
get_latest_install_instance,
|
||||
|
|
@ -43,7 +42,7 @@ async def api_get_latest_install_instance(
|
|||
async def api_install_def_elements(
|
||||
db_session=Depends(get_db_session),
|
||||
):
|
||||
elements = await install_default_elements(db_session)
|
||||
elements = install_default_elements(db_session)
|
||||
|
||||
return elements
|
||||
|
||||
|
|
@ -53,7 +52,7 @@ async def api_install_org(
|
|||
org: OrganizationCreate,
|
||||
db_session=Depends(get_db_session),
|
||||
):
|
||||
organization = await install_create_organization(org, db_session)
|
||||
organization = install_create_organization(org, db_session)
|
||||
|
||||
return organization
|
||||
|
||||
|
|
@ -64,7 +63,7 @@ async def api_install_user(
|
|||
org_slug: str,
|
||||
db_session=Depends(get_db_session),
|
||||
):
|
||||
user = await install_create_organization_user(data, org_slug, db_session)
|
||||
user = install_create_organization_user(data, org_slug, db_session)
|
||||
|
||||
return user
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue