Commit 58aecb83 authored by Jiaan Louw's avatar Jiaan Louw

Update api.js group to make callback optional

parent e653b984
......@@ -52,7 +52,7 @@ const Api = {
environmentsPath: '/api/:version/projects/:id/environments',
rawFilePath: '/api/:version/projects/:id/repository/files/:path/raw',
group(groupId, callback) {
group(groupId, callback = () => {}) {
const url = Api.buildUrl(Api.groupPath).replace(':id', groupId);
return axios.get(url).then(({ data }) => {
callback(data);
......
......@@ -9,7 +9,7 @@ export default {
inheritAttrs: false,
tokenMethods: {
fetchItem(id) {
return Api.group(id, () => {});
return Api.group(id);
},
fetchSuggestions(term) {
return Api.groups(term);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment