You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/plugin/api.go
+41-10Lines changed: 41 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,8 @@ const (
37
37
requestTimeout=30*time.Second
38
38
oauthCompleteTimeout=2*time.Minute
39
39
40
-
channelIDParam="channelId"
40
+
channelIDParam="channelId"
41
+
organisationParam="organization"
41
42
)
42
43
43
44
typeOAuthStatestruct {
@@ -1441,11 +1442,18 @@ func (p *Plugin) getReposByOrg(c *UserContext, w http.ResponseWriter, r *http.Re
1441
1442
1442
1443
opt:= github.ListOptions{PerPage: 50}
1443
1444
1444
-
orgString:=r.URL.Query().Get("organization")
1445
+
orgString:=r.URL.Query().Get(organisationParam)
1445
1446
1446
1447
iforgString=="" {
1447
1448
c.Log.Warnf("Organization query param is empty")
1448
-
p.writeAPIError(w, &APIErrorResponse{Message: "Organization query is empty, must include organization name ", StatusCode: http.StatusBadRequest})
1449
+
p.writeAPIError(w, &APIErrorResponse{Message: "Organization query parameter is empty, must include organization name ", StatusCode: http.StatusBadRequest})
0 commit comments