Skip to content

Commit cbefdb2

Browse files
committed
Pass the whole app to db2sdk
1 parent 80501f5 commit cbefdb2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

enterprise/coderd/oauth2.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,11 @@ func (api *API) oAuth2ProviderApps(rw http.ResponseWriter, r *http.Request) {
7777
return
7878
}
7979

80-
var dbApps []database.OAuth2ProviderApp
80+
var sdkApps []codersdk.OAuth2ProviderApp
8181
for _, app := range userApps {
82-
dbApps = append(dbApps, database.OAuth2ProviderApp{
83-
ID: app.OAuth2ProviderApp.ID,
84-
Name: app.OAuth2ProviderApp.Name,
85-
CallbackURL: app.OAuth2ProviderApp.CallbackURL,
86-
Icon: app.OAuth2ProviderApp.Icon,
87-
})
82+
sdkApps = append(sdkApps, db2sdk.OAuth2ProviderApp(api.AccessURL, app.OAuth2ProviderApp))
8883
}
89-
httpapi.Write(ctx, rw, http.StatusOK, db2sdk.OAuth2ProviderApps(api.AccessURL, dbApps))
84+
httpapi.Write(ctx, rw, http.StatusOK, sdkApps)
9085
}
9186

9287
// @Summary Get OAuth2 application.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy