Skip to content
This repository has been archived by the owner on May 21, 2023. It is now read-only.

Commit

Permalink
fix: invaild param
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroday0619 committed Sep 16, 2022
1 parent a88e130 commit 195291a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions nso_bridge/nso.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,22 @@ def getActiveEvent(self):
raise Exception(f"Error: {resp.status_code}")
return resp.json()

def getEvent(self):
def getEvent(self, user_id: str):
"""Get information of events."""
resp = requests.post(url=self.url + "/v1/Event/Show", headers=self.headers)
resp = requests.post(
url=self.url + "/v1/Event/Show",
headers=self.headers,
params={"id": user_id},
)
if resp.status_code != 200:
raise Exception(f"Error: {resp.status_code}")
return resp.json()

def getUser(self):
def getUser(self, user_id: str):
"""Get information of user."""
resp = requests.post(url=self.url + "/v1/User/Show", headers=self.headers)
resp = requests.post(
url=self.url + "/v1/User/Show", headers=self.headers, params={"id": user_id}
)
if resp.status_code != 200:
raise Exception(f"Error: {resp.status_code}")
return resp.json()
Expand Down

0 comments on commit 195291a

Please sign in to comment.