예제 #1
0
func (this *MainController) Get() {
	items, err := datahandlers.GetViewItems(0)
	if err == nil {
		this.Data["items"] = items
		this.TplNames = "index.html"
	}
}
예제 #2
0
// @router /api/list/:lastindex [get]
func (this *CMSController) ListAddedRecords() {
	lastindex, _ := this.GetInt(":lastindex")

	items, err := datahandlers.GetViewItems(lastindex)
	if err == nil {
		this.Data["json"] = &items
		this.ServeJson()
	}
}