Use named ActionType constants in template helper (#2545)

This commit is contained in:
Ethan Koenig
2017-09-19 18:22:42 -07:00
committed by Lunny Xiao
parent 4eed85db56
commit acecedc410
2 changed files with 13 additions and 15 deletions

View File

@ -98,9 +98,8 @@ func (a *Action) AfterSet(colName string, _ xorm.Cell) {
}
// GetOpType gets the ActionType of this action.
// TODO: change return type to ActionType ?
func (a *Action) GetOpType() int {
return int(a.OpType)
func (a *Action) GetOpType() ActionType {
return a.OpType
}
func (a *Action) loadActUser() {