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

Coordinate with the server to integrate the new moderation experience #885

Open
8 tasks
Tracked by #58
teolemon opened this issue Nov 24, 2023 · 8 comments
Open
8 tasks
Tracked by #58
Assignees
Labels
✨ enhancement New feature or request 🎯 P1 ⭐ top issue Top issue.

Comments

@teolemon
Copy link
Member

teolemon commented Nov 24, 2023

What

The new moderation tool is about to be deployed. Will update this as a backend is finalized
https://nutripatrol.openfoodfacts.org/api/docs

API Endpoints for the new moderation experience

Preview Give feedback

Data Models

  • Flag: Represents a flag raised by a user on a product or image.

  • Ticket: Represents a ticket associated with a flag, containing details about the issue.

  • Additional Notes:

  • The client should support validation of user input and error handling.

  • Authentication mechanisms should be implemented to restrict access to specific functionalities.

PoC @raphael0202 + Valentin

https://github.com/openfoodfacts/nutripatrol
https://github.com/openfoodfacts/nutripatrol/blob/main/app/api.py

Part of

@teolemon teolemon added the ✨ enhancement New feature or request label Nov 24, 2023
@teolemon teolemon transferred this issue from openfoodfacts/smooth-app Feb 16, 2024
@teolemon teolemon added the P2 label Feb 16, 2024
@teolemon
Copy link
Member Author

@monsieurtanuki the API doc has just been deployed by @raphael0202

@teolemon
Copy link
Member Author

@g123k @monsieurtanuki NutriPatrol is now live in production

Tickets only available to moderators
Flagging available to everyone (logged-in)
Flagging webviews by Valentin:
A product https://nutripatrol.openfoodfacts.org/flag/product?barcode=3017620422003&source=web&flavor=off
A image https://nutripatrol.openfoodfacts.org/flag/image?barcode=3017620422003&source=web&flavor=off&image_id=1

We can do it in two times, integrate as links to webviews, then integrate natively at a later point. All the more that integrations need to be done at several places, and that's some work: openfoodfacts/smooth-app#5390

@teolemon teolemon added 🎯 P1 and removed P2 labels Jul 16, 2024
@monsieurtanuki
Copy link
Contributor

@teolemon I guess it would be easy for me to replicate for nutripatrol what was done for prices, on the off-dart level.
Then Valentin could work on the Smoothie side.
@g123k Would that be ok with you or would you like Valentin to work on both off-dart and Smoothie for nutripatrol?

@monsieurtanuki
Copy link
Contributor

@g123k ping

@monsieurtanuki
Copy link
Contributor

Oh, I hadn't understood that nutripatrol couldn't be used as an API for the moment (e.g. "Login with your OpenFoodFacts account" when I click on https://nutripatrol.openfoodfacts.org/flag/product?barcode=3017620422003&source=web&flavor=off and there's no matching API flag entry).

@raphael0202
Copy link

@monsieurtanuki I'm not sure to understand, Nutripatrol can be used as API:

https://nutripatrol.openfoodfacts.org/api/v1/flags

@monsieurtanuki
Copy link
Contributor

@raphael0202 Fair enough. I guess I clicked on the first link provided, which opened a HTML page.

@Valimp
Copy link
Collaborator

Valimp commented Oct 29, 2024

Could you assign me this issue please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request 🎯 P1 ⭐ top issue Top issue.
Development

No branches or pull requests

4 participants