ai-cfia / fertiscan-backend

Fertiscan backend
MIT License
1 stars 0 forks source link

Issue #47: Support multiple users at the same time. #56

Closed snakedye closed 3 weeks ago

snakedye commented 1 month ago

This PR doesn't change the API of the router. Only the mechanics under the hood.

Architecture

sessions
│
└───user_id_1
│   │
│   └───label_id_1: label
│   └───label_id_2: label
│   └───label_id_3: label
│
└───user_id_2
    │
    └───label_id_1: label
    └───label_id_2: label

In this representation:

This structure allows each user to have a unique set of labels, and each label can store a LabelStorage.

Closes #47

snakedye commented 4 weeks ago

@Youllou The API remains the same. Once that's merged I'll focus on making /analyze work alone. Test on your end if the frontend works as is with this branch before approving.

All the unit tests pass. image

Youllou commented 4 weeks ago

Je ne comprends pas comment l'authentification fonctionne, Est ce que je dois passer pas /new_label avant /upload ?

snakedye commented 4 weeks ago

@Youllou image Dans cette PR j'assume juste que le user_id est valide. Le check ne fonctionne pas vraiment.