Skip to content

Commit

Permalink
[#202] ๐Ÿš‘๏ธ ๋Œ€์‹œ๋ณด๋“œ ๋ชฉ๋ก ํ˜ธ์ถœ ๊ธฐ๋ณธ ๊ฐ’ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
JuhyeokC committed Aug 14, 2024
1 parent 3b68c65 commit e977704
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/lib/dashboardsApi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import api from '@/lib/axiosInstance'
import {DashboardMember} from '@/types/types'
import { DashboardMember } from '@/types/types'

/**
* @function convertURL
Expand Down Expand Up @@ -32,18 +32,16 @@ export const createDashboard = async (title: string, color: string) => {
export const getDashboardList = async (): Promise<any> => {
const params: {
navigationMethod: 'infiniteScroll' | 'pagination'
page: number
size: number
page: string
size: string
} = {
navigationMethod: 'infiniteScroll',
page: 0,
size: 10,
page: String(1),
size: String(100),
}

try {
const response = await api.get(
'dashboards?navigationMethod=infiniteScroll&page=1&size=10'
)
const response = await api.get(convertURL('dashboards', params))
const { dashboards } = response.data
return dashboards
} catch (error) {
Expand Down

0 comments on commit e977704

Please sign in to comment.