🐛 fix(store.py): add filter_by_user parameter to get_components function to enable filtering components by user
🐛 fix(service.py): add filter_by_user parameter to StoreService's get_components method to enable filtering components by user 🐛 fix(index.ts): add filterByUser parameter to getStoreComponents function to enable filtering components by user
This commit is contained in:
parent
36cb4c31a0
commit
ccd851cad0
3 changed files with 18 additions and 2 deletions
|
|
@ -598,7 +598,8 @@ export async function getStoreComponents(
|
|||
tags?: string[] | null,
|
||||
liked?: boolean | null,
|
||||
status?: string | null,
|
||||
search?: string | null
|
||||
search?: string | null,
|
||||
filterByUser?: string | null
|
||||
): Promise<StoreComponentResponse | undefined> {
|
||||
try {
|
||||
let url = `${BASE_URL_API}store/components/`;
|
||||
|
|
@ -623,6 +624,10 @@ export async function getStoreComponents(
|
|||
queryParams.push(`liked=${liked}`);
|
||||
}
|
||||
|
||||
if (filterByUser !== undefined && filterByUser !== null) {
|
||||
queryParams.push(`filter_by_user=${filterByUser}`);
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
queryParams.push(`page=${page ?? 1}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue