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

Create /review/approve-source endpoint #151

Open
maxachis opened this issue Feb 18, 2025 · 0 comments
Open

Create /review/approve-source endpoint #151

maxachis opened this issue Feb 18, 2025 · 0 comments

Comments

@maxachis
Copy link
Collaborator

maxachis commented Feb 18, 2025

Approve a source through the source identification API.

If submitted as approved:

  1. The source is marked as approved and the user's ID is stored and associated with the url in a approving_user_url table

If submitted as not relevant, aka rejected:

  1. The source is confirmed as rejected in the Source Collector Database

After a source is submitted through this endpoint, whether as approved or rejected, it can no longer be annotated by either the auto-labeler or by users, nor can it be submitted again.

Endpoint parameters

All of the below will be required:

  • url_id: The source collector URL id.
  • record_type: The record type to be given in the /data-sources endpoint
  • agency_id: The agency id to associate with the data type. Single agency ID assumed.

Internal logic

  • This will require the addition of a new approved enum value for the url_status enum
  • This will require the addition of a new approving_user_url table
  • If an agency is not confirmed, it will need to be confirmed
  • Metadata values (record_type, relevant) will need to be set as confirmed.

Additional Notes

This will not submit a source right away to Data Sources API. That task will be handled by #152

@maxachis maxachis changed the title Create /review/submit-source endpoint Create /review/approve-source endpoint Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant