-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat:메인 더미 데미터 api 생성 * feat:api 출력 * refactor:기능에 맞는 코드로 수정
- Loading branch information
Showing
4 changed files
with
70 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { unitripSupabase } from '@/utils/supabaseClient'; | ||
|
||
const getDummyData = async () => { | ||
const { data, error } = await unitripSupabase.from('PLACE').select('*'); | ||
|
||
if (error) { | ||
throw new Error('서버에 문제가 있습니다'); | ||
} | ||
|
||
return data; | ||
}; | ||
|
||
export default getDummyData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface MainDummyResponse { | ||
contentId: number; | ||
place: string; | ||
review_count: number; | ||
rating: number; | ||
overview: string; | ||
thumbnail: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters