Esempio n. 1
0
func (p *OrderList) _onStatusEvent(trackNumber int64, status string, tab string) *exit.Exit {
	err := orderservice.ChangeOrderStatus(trackNumber, status)
	if err != nil {
		panic(err.Error())
	}
	return route.RedirectDispatch(route.GetRefererFromURL(p.Request()), "/order/list")
}
Esempio n. 2
0
func (p *ConstList) Ondelete(id int64) interface{} {
	fmt.Println("\n\n\n\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
	fmt.Println("things i want to see is:  ", p.Referer)
	if _, err := service.Const.DeleteById(id); err != nil {
		panic(err)
	}
	// return exit.RedirectFirstValid(p.Referer, "/admin/preference/")
	refererurl := route.GetRefererFromURL(p.Request())
	return route.RedirectDispatch(refererurl, "/admin/preference/")
}