ocodista / trampar-de-casa

Apoiamos o trabalho remoto e divulgamos vagas semanalmente para inscritos.
https://trampardecasa.com.br
GNU General Public License v3.0
2.67k stars 104 forks source link

Update Role Assignment Logic to Use New matchRoles Project #283

Closed Luisfp0 closed 2 months ago

Luisfp0 commented 2 months ago

This PR updates the role assignment module to utilize the new matchRoles project instead of fetching roles directly from Supabase. The main changes include:

Removal of Supabase Dependencies:

The getSubscriberRoles method has been replaced by a call to the new FastAPI service endpoint. Addition of FastAPI Request:

A FastAPI endpoint (FASTAPI_ENDPOINT) has been introduced to obtain roles based on the subscriber's skills. Conditional Role Handling:

If the subscriber has skillsId, the function makes a request to FastAPI to get roles based on the provided skills and languages. If the subscriber does not have skillsId, the top40Roles method is used to retrieve a default set of roles.