MCPcopy Index your code
hub / github.com/coder/coder / GetApp

Function GetApp

coderd/oauth2provider/apps.go:62–68  ·  view source on GitHub ↗

GetApp returns an http.HandlerFunc that handles GET /oauth2-provider/apps/{app}

(accessURL *url.URL)

Source from the content-addressed store, hash-verified

60
61// GetApp returns an http.HandlerFunc that handles GET /oauth2-provider/apps/{app}
62func GetApp(accessURL *url.URL) http.HandlerFunc {
63 return func(rw http.ResponseWriter, r *http.Request) {
64 ctx := r.Context()
65 app := httpmw.OAuth2ProviderApp(r)
66 httpapi.Write(ctx, rw, http.StatusOK, db2sdk.OAuth2ProviderApp(accessURL, app))
67 }
68}
69
70// CreateApp returns an http.HandlerFunc that handles POST /oauth2-provider/apps
71func CreateApp(db database.Store, accessURL *url.URL, auditor *audit.Auditor, logger slog.Logger) http.HandlerFunc {

Callers 1

oAuth2ProviderAppMethod · 0.92

Calls 4

OAuth2ProviderAppFunction · 0.92
WriteFunction · 0.92
OAuth2ProviderAppFunction · 0.92
ContextMethod · 0.65

Tested by

no test coverage detected