<Luca Parimbelli - 1053142>
<Luca Ghislotti - 1052975>
<Alessandro Mazzola - 1053121>
<Andrea Marinò - 1053230>
<Christian Spano - 1053028>connect_to_db().then(() => {
console.log('=> get_all talks');
talk.find({_id: body.id}, {watch_next_url: 1, _id: 0})
.skip((body.doc_per_page * body.page) - body.doc_per_page)
.limit(body.doc_per_page)
.then(talks => {
callback(null, {
statusCode: 200,
body: JSON.stringify(talks)
})
}
)
.catch(err =>
callback(null, {
statusCode: err.statusCode || 500,
headers: { 'Content-Type': 'text/plain' },
body: 'Could not fetch the talks.'
})
);
});connect_to_db().then(() => {
console.log('=> get_all talks');
talk.find({url: body.url})
.skip((body.doc_per_page * body.page) - body.doc_per_page)
.limit(body.doc_per_page)
.then(talks => {
callback(null, {
statusCode: 200,
body: JSON.stringify(talks)
})
}
)
.catch(err =>
callback(null, {
statusCode: err.statusCode || 500,
headers: { 'Content-Type': 'text/plain' },
body: 'Could not fetch the talks.'
})
);
});connect_to_db().then(() => {
console.log('=> get_all talks');
talk.find({main_speaker: body.speaker})
.skip((body.doc_per_page * body.page) - body.doc_per_page)
.limit(body.doc_per_page)
.then(talks => {
callback(null, {
statusCode: 200,
body: JSON.stringify(talks)
})
}
)
.catch(err =>
callback(null, {
statusCode: err.statusCode || 500,
headers: { 'Content-Type': 'text/plain' },
body: 'Could not fetch the talks.'
})
);
});connect_to_db().then(() => {
console.log('=> get_all talks');
talk.find({"speaker.speaker_profession": body.profession})
.skip((body.doc_per_page * body.page) - body.doc_per_page)
.limit(body.doc_per_page)
.then(talks => {
callback(null, {
statusCode: 200,
body: JSON.stringify(talks)
})
}
)
.catch(err =>
callback(null, {
statusCode: err.statusCode || 500,
headers: { 'Content-Type': 'text/plain' },
body: 'Could not fetch the talks.'
})
);
});Sviluppare funzione Lambda che ricerca video correlati a parole chiave selezionate;
Gestire accesso utenti;
Implementare tutte le funzioni strettamente collegate all'utente: