Implement v4 endpoints for OAuth (#6040)
* Implement POST /oauth/apps endpoint for APIv4
* Implement GET /oauth/apps endpoint for APIv4
* Implement GET /oauth/apps/{app_id} and /oauth/apps/{app_id}/info endpoints for APIv4
* Refactor API version independent oauth endpoints
* Implement DELETE /oauth/apps/{app_id} endpoint for APIv4
* Implement /oauth/apps/{app_id}/regen_secret endpoint for APIv4
* Implement GET /user/{user_id}/oauth/apps/authorized endpoint for APIv4
* Implement POST /oauth/deauthorize endpoint
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1a0f8d1b3c
Коммит
be9624e2ad
@@ -26,12 +26,14 @@ type ApiParams struct {
|
||||
HookId string
|
||||
ReportId string
|
||||
EmojiId string
|
||||
AppId string
|
||||
Email string
|
||||
Username string
|
||||
TeamName string
|
||||
ChannelName string
|
||||
PreferenceName string
|
||||
Category string
|
||||
Service string
|
||||
Page int
|
||||
PerPage int
|
||||
}
|
||||
@@ -77,6 +79,10 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams {
|
||||
params.EmojiId = val
|
||||
}
|
||||
|
||||
if val, ok := props["app_id"]; ok {
|
||||
params.AppId = val
|
||||
}
|
||||
|
||||
if val, ok := props["email"]; ok {
|
||||
params.Email = val
|
||||
}
|
||||
@@ -97,6 +103,10 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams {
|
||||
params.Category = val
|
||||
}
|
||||
|
||||
if val, ok := props["service"]; ok {
|
||||
params.Category = val
|
||||
}
|
||||
|
||||
if val, ok := props["preference_name"]; ok {
|
||||
params.PreferenceName = val
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user