fix(trigger): update return type in TriggerSubscriptionBuilderService

- Changed the return type of the method in `TriggerSubscriptionBuilderService` from `SubscriptionBuilder` to `SubscriptionBuilderApiEntity` for improved clarity and alignment with API entity structures.
- Updated the return statement to utilize the new method for converting the builder to the API entity.
This commit is contained in:
Harry 2025-09-10 15:48:19 +08:00
parent 9249a2af0d
commit 6566824807
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ class TriggerSubscriptionBuilderService:
user_id: str,
provider_id: TriggerProviderID,
credential_type: CredentialType,
) -> SubscriptionBuilder:
) -> SubscriptionBuilderApiEntity:
"""
Add a new trigger subscription validation.
"""
@ -170,7 +170,7 @@ class TriggerSubscriptionBuilderService:
redis_client.setex(
cache_key, cls.__VALIDATION_REQUEST_CACHE_EXPIRE_MS__, subscription_builder.model_dump_json()
)
return subscription_builder
return cls.builder_to_api_entity(controller=provider_controller, entity=subscription_builder)
@classmethod
def update_trigger_subscription_builder(