Skip to content

Commit

Permalink
fix: only forbid endpoint, not function (#839)
Browse files Browse the repository at this point in the history
Signed-off-by: Agustín Ramiro Díaz <[email protected]>
  • Loading branch information
AgustinRamiroDiaz authored Jan 22, 2025
1 parent e640dd2 commit bbe73df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/protocol_rpc/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def delete_provider(llm_provider_registry: LLMProviderRegistry, id: int) -> None
llm_provider_registry.delete(id)


@check_forbidden_method_in_hosted_studio
def create_validator(
validators_registry: ValidatorsRegistry,
accounts_manager: AccountsManager,
Expand Down Expand Up @@ -743,7 +742,11 @@ def register_all_rpc_endpoints(
method_name="sim_deleteProvider",
)
register_rpc_endpoint(
partial(create_validator, validators_registry, accounts_manager),
partial(
check_forbidden_method_in_hosted_studio(create_validator),
validators_registry,
accounts_manager,
),
method_name="sim_createValidator",
)
register_rpc_endpoint(
Expand Down

0 comments on commit bbe73df

Please sign in to comment.