Allow shared channel remotes endpoint to be filtered by confirmation status (#28213)
* Allow shared channel remotes endpoint to be filtered by confirmation status * Adds tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
70cb1934e9
Коммит
7a0019b63a
@@ -99,6 +99,8 @@ type Params struct {
|
||||
CreatorId string
|
||||
OnlyConfirmed bool
|
||||
OnlyPlugins bool
|
||||
IncludeUnconfirmed bool
|
||||
ExcludeConfirmed bool
|
||||
ExcludePlugins bool
|
||||
ExcludeHome bool
|
||||
ExcludeRemote bool
|
||||
@@ -170,6 +172,8 @@ func ParamsFromRequest(r *http.Request) *Params {
|
||||
params.CreatorId = query.Get("creator_id")
|
||||
params.OnlyConfirmed, _ = strconv.ParseBool(query.Get("only_confirmed"))
|
||||
params.OnlyPlugins, _ = strconv.ParseBool(query.Get("only_plugins"))
|
||||
params.IncludeUnconfirmed, _ = strconv.ParseBool(query.Get("include_unconfirmed"))
|
||||
params.ExcludeConfirmed, _ = strconv.ParseBool(query.Get("exclude_confirmed"))
|
||||
params.ExcludePlugins, _ = strconv.ParseBool(query.Get("exclude_plugins"))
|
||||
params.ExcludeHome, _ = strconv.ParseBool(query.Get("exclude_home"))
|
||||
params.ExcludeRemote, _ = strconv.ParseBool(query.Get("exclude_remote"))
|
||||
|
||||
Ссылка в новой задаче
Block a user