get carreras

This commit is contained in:
2020-10-02 12:46:12 -05:00
parent 3e7907d083
commit 40133cc488
4 changed files with 28 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
const Carrera = require('../../db/tables/Carrera')
const CarreraPlantel = require('../../db/tables/CarreraPlantel')
const get = async (body) => {
return CarreraPlantel.findAll({
where: { idPlantel: body.idPlantel },
include: [{ model: Carrera }],
})
.then((res) => {
return res
})
.catch((err) => {})
}
module.exports = get
// get({ idPlantel: 240 })
View File
+11
View File
@@ -0,0 +1,11 @@
const Plantel = require('../../db/tables/Plantel')
const get = async () => {
return Plantel.findAll()
.then((res) => {
return res
})
.catch((err) => {})
}
module.exports = get
View File