GET https://reparoiobackend-main.up.railway.app/home/professionals
[{
id: "93fdab72-6b0c-4b4d-a33f-f44774e7063c",
firstName: "antonio",
lastName: "gonzales",
phoneNumber: 111111111,
address: "hola estoy aqui",
aboutMe: "There's no description available",
email: "afrodito@reparo.io",
password: "123",
profileImg: "https://img.icons8.com/fluency-systems-regular/96/000000/guest-male.png",
professions: [
{
"id": 10,
"name": "plomero",
"Prof_Prof": {
"professionalId": "93fdab72-6b0c-4b4d-a33f-f44774e7063c",
"professionId": 10
}
}
]
}]
GET https://reparoiobackend-main.up.railway.app/home/professionals/${id}
{
id: "6bf9016f-427c-465a-97bb-332a283713b4",
firstName: "lucas",
lastName: "ca;o ramirez",
profileImg: "https://img.icons8.com/fluency-systems-regular/96/000000/guest-male.png",
reputation: "not available yet",
professions: [
{
"id": 10,
"name": "plomero",
"Prof_Prof": {
"professionalId": "6bf9016f-427c-465a-97bb-332a283713b4",
"professionId": 10
}
}
]
}
GET https://reparoiobackend-main.up.railway.app/home?search={search}
POST https://reparoiobackend-main.up.railway.app/home/professionals
Requiere:
{
id: STRING,
firstName: STRING,
lastName: STRING,
profileImg: STRING,
address: STRING,
phoneNumber: STRING,
email: STRING,
password: STRING,
professions: []
}
POST _todavia no se pasa a produccion_
Rutas:
- Regresa la lista de profesiones:
GET https://reparoiobackend-main.up.railway.app/home/professions
- Agregar Profesion:
POST https://reparoiobackend-main.up.railway.app/home/professions
- Requiere(body):
{
"name":STRING
}
-Retorna:
//Exitoso:
{
"id": INTEGER, //El nuevo id assignado
"name": STRING
}
//nombre ya existe:
{
"message": "Ya existia",
"professional": {
"id": INTEGER, // id en el que esta guardado
"name": STRING
}
}
// no se envio el formato correcto:
{
"error": "es necesario el nombre del profesional"
}