mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
18 lines
440 B
JavaScript
18 lines
440 B
JavaScript
import { BaseService, RequestHelper } from '../infrastructure';
|
|
|
|
class Search extends BaseService {
|
|
all(scope, search, { projectId, groupId } = {}) {
|
|
let url = '';
|
|
|
|
if (projectId) {
|
|
url += `projects/${encodeURIComponent(projectId)}/`;
|
|
} else if (groupId) {
|
|
url += `groups/${encodeURIComponent(groupId)}/`;
|
|
}
|
|
|
|
return RequestHelper.get(this, `${url}search`, { scope, search });
|
|
}
|
|
}
|
|
|
|
export default Search;
|