refactor: update summary in controller

This commit is contained in:
debugtalk
2022-10-18 15:51:56 +08:00
parent c5f81f2593
commit 23abc56a82
12 changed files with 112 additions and 140 deletions

View File

@@ -6,8 +6,8 @@ import (
// general: [0, 20)
const (
SUCCESS = 0
FAIL = 1
Success = 0
GeneralFail = 1
)
// loader: [20, 40)
@@ -64,7 +64,7 @@ var errorsMap = map[error]int{
func GetErrorCode(err error) int {
if err == nil {
return SUCCESS
return Success
}
e := errors.Cause(err)
@@ -72,5 +72,5 @@ func GetErrorCode(err error) int {
return code
}
return FAIL
return GeneralFail
}