This commit is contained in:
marzban-dev
2025-02-02 21:20:43 +03:30
parent e351f998aa
commit 066fec210d
@@ -5,11 +5,11 @@ import { API_ENDPOINTS, QUERY_KEYS } from "~/constants";
// types
export type GetArticlesResponse = ApiPaginated<UserComment>;
export type GetArticlesResponse = ApiPaginated<Article>;
const useGetArticles = (
page: Ref<number>,
search: Ref<string>
search?: Ref<string>
) => {
// state
@@ -23,7 +23,7 @@ const useGetArticles = (
params: {
offset: (page.value * 10) - 10,
limit: 10,
search: search.value.length > 0 ? search.value : undefined,
search: search ? (search.value.length > 0 ? search.value : undefined) : undefined,
}
});
return data;