8000 Pass the whole app to db2sdk · coder/coder@c06218e · GitHub
[go: up one dir, main page]

Skip to content

Commit c06218e

Browse files
committed
Pass the whole app to db2sdk
1 parent 30679d7 commit c06218e

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)
0