From 066fec210dc9a50496aa8e5cf212d63d6e594ef8 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Sun, 2 Feb 2025 21:20:43 +0330 Subject: [PATCH] Updated --- frontend/composables/api/blog/useGetArticles.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/composables/api/blog/useGetArticles.ts b/frontend/composables/api/blog/useGetArticles.ts index 0ccfde0..91d1f61 100644 --- a/frontend/composables/api/blog/useGetArticles.ts +++ b/frontend/composables/api/blog/useGetArticles.ts @@ -5,11 +5,11 @@ import { API_ENDPOINTS, QUERY_KEYS } from "~/constants"; // types -export type GetArticlesResponse = ApiPaginated; +export type GetArticlesResponse = ApiPaginated
; const useGetArticles = ( page: Ref, - search: Ref + search?: Ref ) => { // 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;