WorkspaceAgent returns the workspace agent from the ExtractAgent handler.
(r *http.Request)
| 25 | |
| 26 | // WorkspaceAgent returns the workspace agent from the ExtractAgent handler. |
| 27 | func WorkspaceAgent(r *http.Request) database.WorkspaceAgent { |
| 28 | user, ok := WorkspaceAgentOptional(r) |
| 29 | if !ok { |
| 30 | panic("developer error: agent middleware not provided or was made optional") |
| 31 | } |
| 32 | return user |
| 33 | } |
| 34 | |
| 35 | type latestBuildContextKey struct{} |
| 36 |