const Experience = require('./models/Experience');
const Graduation = require('./models/Graduation');
const Project = require('./models/Project');
const User = require('./models/User');
async function getAndShowSomeInformations({ username }) {
// USER DETAILS -----------------------------------------
const user = await User.findOne({
username,
});
console.log(user);
/* {
_id: '5a093631713c0900019b0000',
name: 'Thiago Souza',
username: 'thrsouza'
title: 'Full Stack Developer',
alias: ['ZeroDois', 'Rezim', 'Mizer'],
hobbies: ['Music', 'Games', 'Movies', 'Series'],
} */
// CURRENT JOB ------------------------------------------
const currentJob = await Experience.findOne({
userId: user._id,
endDate: null,
});
console.log(currentJob);
/* {
_id: '5b093631713c0900019b0001',
userId: '5a093631713c0900019b0000',
title: 'Full Stack Technical Leader',
companyName: 'Golfleet Tecnologia',
employmentType: 'Full-time',
location: 'Londrina, PR - Brazil',
startDate: '2020-01-16',
endDate: null,
} */
// GRADUATION -------------------------------------------
const graduation = await Graduation.findOne({
userId: user._id
});
console.log(graduation);
/* {
_id: '5c093631713c0900019b0002',
userId: '5a093631713c0900019b0000',
school: 'Campus Virtual Cruzeiro do Sul Educacional',
fieldOfStudy: 'Análise e Desenvolvimento de Sistemas',
startDate: '2018-01-01',
endDate: '2020-12-31',
} */
// OPEN SOURCE PROJECTS ---------------------------------
const projectsOpenSource = await Project.find({
userId: user._id,
openSource: true
});
console.log(projectsOpenSource);
/* [
{
_id: '5d093631713c0900019b0003',
userId: '5a093631713c0900019b0000',
name: 'neutronjs',
repository: 'https://github.com/neutronjs/neutron',
openSource: true,
},
{
_id: '5d093631713c0900019b0004',
userId: '5a093631713c0900019b0000',
name: 'cheesecakejs',
repository: 'https://github.com/thrsouza/cheesecake',
openSource: true,
},
] */
}
getAndShowSomeInformations({ username: 'thrsouza' });
- Londrina, PR - Brazil
- https://thiagosouza.com
Highlights
Block or Report
Block or report thrsouza
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
neutronjs/neutron
neutronjs/neutron PublicNeutron is a CLI developed to help developers create new react projects with Redux + Redux Saga and offers well-structured code standardization.
-
cheesecake
cheesecake PublicCheesecake is the best option for Raspberry Pi with Nodejs!
JavaScript 10
-
github-compare
github-compare PublicThis project was created along the second module of ReactJS (GoStack - Rocketseat).
JavaScript 1
-
github-users-map
github-users-map PublicThis project was created on the third module of ReactJS (GoStack - Rocketseat).
JavaScript 1
If the problem persists, check the GitHub status page or contact support.