mirror of
https://github.com/kataras/iris.git
synced 2026-01-22 03:15:58 +00:00
add some MVC error handle examples
This commit is contained in:
@@ -242,7 +242,10 @@ func (r *response) Preflight(ctx iris.Context) error {
|
||||
r.Timestamp = time.Now().Unix()
|
||||
}
|
||||
|
||||
ctx.StatusCode(r.Code)
|
||||
if r.Code > 0 {
|
||||
ctx.StatusCode(r.Code)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user