Skip to content

Commit

Permalink
feat(backend): Add subscription_id in public GET route
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Nov 26, 2024
1 parent 9263304 commit 3597c80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/interfaces/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class UpdateAgentResponse(BaseModel):

class PublicAgentData(BaseModel):
id: str
subscription_id: str
vm_hash: str | None
last_update: int


class Agent(PublicAgentData):
subscription_id: str
encrypted_secret: str
tags: list[str]

Expand Down
5 changes: 4 additions & 1 deletion backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ async def get_agent_public_info(agent_id: str) -> GetAgentResponse:
agent = agents[0]

return GetAgentResponse(
id=agent.id, vm_hash=agent.vm_hash, last_update=agent.last_update
id=agent.id,
vm_hash=agent.vm_hash,
last_update=agent.last_update,
subscription_id=agent.subscription_id,
)


Expand Down

0 comments on commit 3597c80

Please sign in to comment.