Esempio n. 1
0
//设置封面
func (this *PhotoController) Cover() {
	id, _ := this.GetInt("id")
	photo := models.Photo{Id: id}
	if photo.Read() == nil {
		photo.Delete()
	}
	this.Redirect("/admin/photo/list", 302)
}
Esempio n. 2
0
File: photo.go Progetto: qiaogw/blog
//删除照片
func (this *PhotoController) Delete() {
	id, _ := this.GetInt64("id")
	albumid := this.GetString("albumid")
	photo := models.Photo{Id: id}
	if photo.Read() == nil {
		photo.Delete()
	}
	this.Redirect("/admin/photo/list?albumid="+albumid, 302)
}