summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js')
-rw-r--r--app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js b/app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js
new file mode 100644
index 00000000000..1d68ccd724d
--- /dev/null
+++ b/app/assets/javascripts/pages/groups/new/fetch_group_path_availability.js
@@ -0,0 +1,7 @@
+import axios from '~/lib/utils/axios_utils';
+
+const rootUrl = gon.relative_url_root;
+
+export default function fetchGroupPathAvailability(groupPath) {
+ return axios.get(`${rootUrl}/users/${groupPath}/suggests`);
+}