forked from soolsul/soolsul-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request soolsul#24 from soolsul/feature/nick/23
[Feat]: barList 조회 기능 구현
- Loading branch information
Showing
6 changed files
with
104 additions
and
22 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,21 @@ | ||
import { BarType } from '@lib/types'; | ||
import { AxiosResponse } from 'axios'; | ||
import APIS from './network'; | ||
|
||
/** | ||
* 로그인하기 | ||
* @param id 유저 아이디 | ||
* @param password 비밀번호 | ||
*/ | ||
export function getBarList(data: BarType.barSearchTyoe): Promise<{ code: string; data: any; message: string }> { | ||
return new Promise((resolve, reject) => { | ||
try { | ||
(async () => { | ||
const result: AxiosResponse<{ code: string; data: any; message: string }> = await APIS.bar.getBarList(data); | ||
resolve(result.data); | ||
})(); | ||
} catch (error) { | ||
reject(error); | ||
} | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import * as user from "./users"; | ||
import * as user from './users'; | ||
import * as bar from './bar'; | ||
|
||
const apis = { | ||
user, | ||
bar, | ||
}; | ||
|
||
export default apis; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface barSearchTyoe { | ||
latitude: number; | ||
longitude: number; | ||
zoomLevel?: number; | ||
moodTag?: string; | ||
drinkTag?: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * as UserType from "./user"; | ||
export * as CategoryType from "./Category"; | ||
export * as UserType from './user'; | ||
export * as CategoryType from './Category'; | ||
export * as BarType from './bar'; |
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