summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorDavid Svantesson <davidsvantesson@gmail.com>2019-10-01 07:32:28 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-10-01 13:32:28 +0800
commit36bcd4cd6b6d1131e3f812a825558fbfe5dcca20 (patch)
tree1606d302648ca6f2f6633d21aeb5d06a568b14d8 /public/js
parentd3bc3dd4d16aef053699d5bfc45039db060d373e (diff)
downloadgitea-36bcd4cd6b6d1131e3f812a825558fbfe5dcca20.tar.gz
gitea-36bcd4cd6b6d1131e3f812a825558fbfe5dcca20.zip
API endpoint for searching teams. (#8108)
* Api endpoint for searching teams. Signed-off-by: dasv <david.svantesson@qrtech.se> * Move API to /orgs/:org/teams/search Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Regenerate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix search is Get Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test for search team API. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update routers/api/v1/org/team.go grammar Co-Authored-By: Richard Mahn <richmahn@users.noreply.github.com> * Fix review comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix some issues in repo collaboration team search, after changes in this PR. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Remove teamUser which is not used and replace with actual user id. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Remove unused search variable UserIsAdmin. * Add paging to team search. * Re-genereate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix review comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * fix * Regenerate swagger
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js
index ad5e3912de..8a85ad9157 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1766,11 +1766,11 @@ function searchTeams() {
$searchTeamBox.search({
minCharacters: 2,
apiSettings: {
- url: suburl + '/api/v1/orgs/' + $searchTeamBox.data('org') + '/teams',
+ url: suburl + '/api/v1/orgs/' + $searchTeamBox.data('org') + '/teams/search?q={query}',
headers: {"X-Csrf-Token": csrf},
onResponse: function(response) {
const items = [];
- $.each(response, function (_i, item) {
+ $.each(response.data, function (_i, item) {
const title = item.name + ' (' + item.permission + ' access)';
items.push({
title: title,