Example #1
0
func List(c *gin.Context) {
	point := model.Point{}
	points := point.GetAll(db)

	obj := make(map[string]interface{})
	obj["points"] = points

	c.HTML(http.StatusOK, "list.html", obj)
}
Example #2
0
/*获得机要密码箱所有位置*/
func GetAllLocation(c *gin.Context) {
	point := model.Point{}
	points := point.GetAll(db)
	c.JSON(http.StatusOK, points)
}