-
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.
Browse files
Browse the repository at this point in the history
Feat/#133
- Loading branch information
Showing
11 changed files
with
313 additions
and
79 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
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,43 @@ | ||
import axiosInstance from "./axiosInstance" | ||
|
||
interface MyCheerUpInfoResData { | ||
data: { | ||
countCheeredUp: number | ||
cheeredUpUids: number[] | ||
} | ||
} | ||
|
||
interface ReportResData { | ||
data: { | ||
id: number | ||
uid: number | ||
email: string | ||
type: string | ||
title: string | ||
content: string | ||
createdAt: string | ||
modifiedAt: string | ||
} | ||
} | ||
|
||
interface SendCrewCheerParam { | ||
uids: number[] | ||
} | ||
|
||
export const requestSendCrewCheer = async (param: SendCrewCheerParam): Promise<ReportResData> => { | ||
try { | ||
const res = await axiosInstance.post(`/cheer-up`, param) | ||
return res.data | ||
} catch (e) { | ||
throw e | ||
} | ||
} | ||
|
||
export const getMyCheerUpInfo = async (date: string): Promise<MyCheerUpInfoResData> => { | ||
try { | ||
const res = await axiosInstance.get(`/cheer-up/me?cheeredAt=${date}`) | ||
return res.data | ||
} catch (e) { | ||
throw e | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.