-
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.
feat : update services/prediction.service.js (#83)
예측 API 추가
- Loading branch information
1 parent
773e8fe
commit 314cb7c
Showing
1 changed file
with
40 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,7 +1,46 @@ | ||
import {predictionApi} from "api" | ||
|
||
const getDailyItem = async(id) => { | ||
try { | ||
const data = await statisticsApi.getWeekItem(id); | ||
return data; | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
const getDailyItemTomorrow = async(id) => { | ||
try { | ||
const data = await statisticsApi.getWeekItem(id); | ||
return data; | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
const getProfit = async(id) => { | ||
try { | ||
const data = await statisticsApi.getWeekItem(id); | ||
return data; | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
const getProfitTomorrow = async(id) => { | ||
try { | ||
const data = await statisticsApi.getWeekItem(id); | ||
return data; | ||
} catch (error) { | ||
throw error; | ||
} | ||
} | ||
|
||
const predictionService = { | ||
|
||
getDailyItem, | ||
getDailyItemTomorrow, | ||
getProfit, | ||
getProfitTomorrow | ||
} | ||
|
||
export default predictionService; |