feat(api): added an incident search api

CHANGE: feature request in https://github.com/rajnandan1/kener/issues/64
This commit is contained in:
Raj Nandan Sharma
2024-04-12 09:40:46 +05:30
parent 94877a056a
commit 1078607805
2 changed files with 3 additions and 2 deletions

View File

@@ -368,13 +368,13 @@ async function SearchIssue(query, page, per_page) {
const url = `https://api.github.com/search/issues?q=${encodeURIComponent(
searchQuery
)}&per_page=${per_page}&page=${page}`;
try {
const response = await axios.request(getAxiosOptions(url));
return response.data;
} catch (error) {
console.log(error.response.data);
return null;
return [];
}
}