name, erp_code, id_controller el parámetro id_controller debe ser unico.PUT_idMaterial debe ser de tipo ObjectyId, y debe estar creado en la lista de materiales para poder obtener las referencias cuando sea consultado una receta por _id o listando todas las recetas.curl --location --request POST 'https://test.your-api-server.com/api/role' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "New admin",
"menu": [
{
"text": "Dashboard",
"link": "main.dashboard",
"submain": [ ]
},
{
"text": "Producción",
"link": "",
"submain": [
{
"text": "Configuración",
"link": "",
"submain": [
{
"text": "Materiales",
"link": "main.material"
},
{
"text": "Receta",
"link": "main.recipe"
}
]
},
{
"text": "Test",
"link": "main.dashboard",
"submain": [ ]
}
]
},
{
"text": "Planeación",
"link": "",
"submain": [
{
"text": "Calendario",
"link": "main.calendar",
"submain": [ ]
},
{
"text": "Data Log",
"link": "main.datalog",
"submain": [ ]
}
]
},
{
"text": "Mail",
"link": "main.dashboard",
"submain": [ ]
},
{
"text": "Blog",
"link": "main.dashboard",
"submain": [ ]
},
{
"text": "Documentación",
"link": "main.dashboard",
"submain": [ ]
}
],
"permissions":{
"module":{
"name":"user",
"actions":["R","W","D","T"]
}},
"deleted": false
}'{
"msg": "Role created successfully",
"roleSaved": {
"name": "user2",
"menu": [
{}
],
"_id": "638c8c577921e9473ad49feb",
"createdAt": "2022-12-04T12:02:31.742Z",
"updatedAt": "2022-12-04T12:02:31.742Z"
}
}