1
0
Fork 0
forked from forgejo/forgejo

Clean api code

This commit is contained in:
Unknown 2014-05-05 13:08:01 -04:00
parent 5f653898f3
commit c1eb4d894a
20 changed files with 277 additions and 121 deletions

View file

@ -78,6 +78,19 @@ func (ctx *Context) Query(name string) string {
// return ctx.p[name]
// }
// HasError returns true if error occurs in form validation.
func (ctx *Context) HasApiError() bool {
hasErr, ok := ctx.Data["HasError"]
if !ok {
return false
}
return hasErr.(bool)
}
func (ctx *Context) GetErrMsg() string {
return ctx.Data["ErrorMsg"].(string)
}
// HasError returns true if error occurs in form validation.
func (ctx *Context) HasError() bool {
hasErr, ok := ctx.Data["HasError"]