Skip to content

Commit

Permalink
use new param
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavsteindler committed Dec 16, 2024
1 parent 03ecf8c commit 79328da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions webui/src/lib/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export const parseRawHeaders = (rawHeaders) => {
const headerLines = cleanedHeadersString.split('\n');
const parsedHeaders = headerLines.reduce((acc, line) => {
let [key, ...value] = line.split(':'); // split into key and the rest of the value
key = key.trim();
value = value.join(':').trim();
key = key.trim();
value = value.join(':').trim();
if (key && value) {
acc[key.toLowerCase()] = value;
}
Expand Down Expand Up @@ -458,8 +458,9 @@ class Repositories {
return response.json();
}

async list(prefix = "", after = "", amount = DEFAULT_LISTING_AMOUNT) {
const query = qs({prefix, after, amount});
async list(search = "", after = "", amount = DEFAULT_LISTING_AMOUNT) {
console.log("list search ", search)
const query = qs({search, after, amount});
const response = await apiRequest(`/repositories?${query}`);
if (response.status !== 200) {
throw new Error(`could not list repositories: ${await extractError(response)}`);
Expand Down

0 comments on commit 79328da

Please sign in to comment.