Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTags #121

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/api/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tags>(
"/v1/tags",

Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/NewsCategoriesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down