Skip to content

Commit

Permalink
revert twinapi change
Browse files Browse the repository at this point in the history
  • Loading branch information
abyesilyurt committed Sep 23, 2024
1 parent f510485 commit 2eca5a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/syft/src/syft/service/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,16 @@ def exec_code(
# run all this code to clean up the state
code.update_state(internal_context.state)

if isinstance(code, PublicAPIEndpoint):
self.mock_function = code
else:
self.private_function = code # type: ignore

api_service = context.server.get_service("apiservice")
api_service.stash.upsert(
context.server.services.user.root_verify_key, self
).unwrap()

print = original_print # type: ignore
# if we caught a SyftException above we will raise and auto wrap to Result
if isinstance(result, SyftException):
Expand Down

0 comments on commit 2eca5a5

Please sign in to comment.