feat: search test case (#277)
This commit is contained in:
@@ -26,7 +26,7 @@ async function fetchCase(jwt: string, caseId: number) {
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchCases(jwt: string, folderId: number, priority?: number[], type?: number[]) {
|
||||
async function fetchCases(jwt: string, folderId: number, priority?: number[], type?: number[], q?: string) {
|
||||
const queryParams = [`folderId=${folderId}`];
|
||||
|
||||
if (priority && priority.length > 0) {
|
||||
@@ -37,6 +37,10 @@ async function fetchCases(jwt: string, folderId: number, priority?: number[], ty
|
||||
queryParams.push(`type=${type.join(',')}`);
|
||||
}
|
||||
|
||||
if (q) {
|
||||
queryParams.push(`q=${q}`);
|
||||
}
|
||||
|
||||
const query = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
|
||||
|
||||
const url = `${apiServer}/cases${query}`;
|
||||
|
||||
Reference in New Issue
Block a user