(app *App, r *http.Request)
| 280 | } |
| 281 | |
| 282 | func webAuth(app *App, r *http.Request) (*User, error) { |
| 283 | u := getUserSession(app, r) |
| 284 | if u == nil { |
| 285 | return nil, ErrNotLoggedIn |
| 286 | } |
| 287 | return u, nil |
| 288 | } |
| 289 | |
| 290 | // UserAPI handles requests made in the API by the authenticated user. |
| 291 | // This provides user-friendly HTML pages and actions that work in the browser. |
no test coverage detected