GetApp returns an http.HandlerFunc that handles GET /oauth2-provider/apps/{app}
(accessURL *url.URL)
| 60 | |
| 61 | // GetApp returns an http.HandlerFunc that handles GET /oauth2-provider/apps/{app} |
| 62 | func 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 |
| 71 | func CreateApp(db database.Store, accessURL *url.URL, auditor *audit.Auditor, logger slog.Logger) http.HandlerFunc { |
no test coverage detected