get carreras
This commit is contained in:
@@ -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 })
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user