Skip to content

Commit

Permalink
fix rename model
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jan 13, 2025
1 parent e7c4b94 commit a7c3b89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions agixt/Models.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,7 @@ class UpdateUserRole(BaseModel):
role_id: int
company_id: str
user_id: str


class RenameCompanyInput(BaseModel):
name: str
5 changes: 3 additions & 2 deletions agixt/endpoints/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ResponseMessage,
NewCompanyInput,
NewCompanyResponse,
RenameCompanyInput,
UpdateUserRole,
)
from fastapi import APIRouter, Request, Header, Depends, HTTPException
Expand Down Expand Up @@ -534,12 +535,12 @@ async def toggle_command(
)
async def rename_company(
company_id: str,
name: str,
company_name: RenameCompanyInput,
email: str = Depends(verify_api_key),
authorization: str = Header(None),
):
auth = MagicalAuth(token=authorization)
return auth.rename_company(company_id, name)
return auth.rename_company(company_id, company_name.name)


@app.put(
Expand Down

0 comments on commit a7c3b89

Please sign in to comment.