summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-09-19 18:22:42 -0700
committerLunny Xiao <xiaolunwen@gmail.com>2017-09-20 09:22:42 +0800
commitacecedc410537667be33df4546e3004d7ddc825f (patch)
tree645f54b7b46190607e45a4a0b6db7b59801a9c34 /models
parent4eed85db56f94385bea35f148e6b981644ea1f22 (diff)
downloadgitea-acecedc410537667be33df4546e3004d7ddc825f.tar.gz
gitea-acecedc410537667be33df4546e3004d7ddc825f.zip
Use named ActionType constants in template helper (#2545)
Diffstat (limited to 'models')
-rw-r--r--models/action.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/action.go b/models/action.go
index 8793a4a24d..e687336229 100644
--- a/models/action.go
+++ b/models/action.go
@@ -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() {