Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Platform Validation Endpoint #308

Open
jsmatias opened this issue May 8, 2024 · 1 comment
Open

Update Platform Validation Endpoint #308

jsmatias opened this issue May 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jsmatias
Copy link
Member

jsmatias commented May 8, 2024

Description:
The current validation mechanism in the endpoint platforms/{platform_name}/{assets}/v1/{platform_resource_identifier} is restricting users from retrieving assets from new platforms that are not listed in the enum class. This limitation arises from the validation process against the platforms defined in the enum class, rather than against the platforms stored in the database.

The enum class is primarily intended to automatically populate the database if it is initially empty, rather than serving as the sole reference for platform validation. As a result, the validation logic should be revised to align with the platforms stored in the database, enabling users to retrieve assets from newly added platforms such as "aida_cms," "bonseyes," and others.

Proposed Solution:
To address this issue, the validation process should be modified to query the database for the list of available platforms and validate against them instead of relying solely on the enum class. This adjustment will ensure that users can retrieve assets from any platform present in the database, thereby accommodating new additions without requiring manual updates to the enum class.

Next Steps:

  1. Modify the validation logic to query the database for available platforms and validate against them dynamically.

Originally from discussion in #298 (comment)

@jsmatias jsmatias added the bug Something isn't working label May 14, 2024
@jsmatias
Copy link
Member Author

jsmatias commented May 29, 2024

Same is done on the search endpoints. There might be other endpoints doing the same and they should be checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant