Skip to content

Commit 50d0623

Browse files
committed
refactor: remove main execution block from CoderAPI
- Deleted the main execution block in coder.py that instantiated CoderAPI and performed workspace status checks, streamlining the code for better modularity.
1 parent 76bf5fb commit 50d0623

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/backend/coder.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,3 @@ def set_workspace_dormancy(self, workspace_id, dormant: bool):
311311
response = requests.put(endpoint, headers=headers, json=data)
312312
response.raise_for_status()
313313
return response.json()
314-
315-
316-
if __name__ == "__main__":
317-
coder = CoderAPI()
318-
workspace_id = coder.get_workspace_status_for_user("alex")["id"]
319-
coder.set_workspace_dormancy(workspace_id, True)
320-
state = coder.get_workspace_status_for_user("alex")
321-
print(state)

0 commit comments

Comments
 (0)