Esempio n. 1
0
func (c Schedule) GetFaculties() revel.Result {
	faculties, err := database.FacultiesList(c.DB)
	if err != nil {
		return jsonError(400, err)
	}
	return c.RenderJson(faculties)
}
Esempio n. 2
0
func (c Admin) Schedule() revel.Result {
	connection := c.connected()
	User := connection.Username

	days := models.DaysList
	pairs := models.PairsList
	faculties, _ := database.FacultiesList(c.DB)
	return c.Render(User, days, pairs, faculties)
}