From 4fa8ad95fe468c6c60901f7ed93d5b6888d0fa5b Mon Sep 17 00:00:00 2001 From: DiegoZaff Date: Wed, 1 Feb 2023 11:46:10 +0100 Subject: [PATCH] getTags --- src/api/index.ts | 2 +- src/api/tags.ts | 2 +- src/components/Home/NewsCategoriesGrid.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 833178dc..3fd94a14 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -10,7 +10,7 @@ export { RetryType, AuthType, RequestOptions } from "./HttpClient" * To make a request: * * ```ts - * api.tags.get({retryType : RetryType.RETRY_N_TIMES, maxRetries : 5}) + * api.tags.getTags({retryType : RetryType.RETRY_N_TIMES, maxRetries : 5}) * .then(response => { * const tags: Tag[] = response * //do something diff --git a/src/api/tags.ts b/src/api/tags.ts index a771046f..97620057 100644 --- a/src/api/tags.ts +++ b/src/api/tags.ts @@ -17,7 +17,7 @@ export const tags = { /** * Retrieves Tags (news categories) from PoliNetwork server. */ - async get(options?: RequestOptions) { + async getTags(options?: RequestOptions) { const response = await client.poliNetworkInstance.get( "/v1/tags", diff --git a/src/components/Home/NewsCategoriesGrid.tsx b/src/components/Home/NewsCategoriesGrid.tsx index 5989fee8..f1837582 100644 --- a/src/components/Home/NewsCategoriesGrid.tsx +++ b/src/components/Home/NewsCategoriesGrid.tsx @@ -34,7 +34,7 @@ export const NewsCategoriesGrid = () => { // patterns to get heights and positions (left / right) of the cards const updateNewsCategories = async () => { try { - const response = await api.tags.get() + const response = await api.tags.getTags() const tempCategories: CategoriesColumns = { left: [], right: [] } // store the pattern data of the current batch of cards