-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/#196
- Loading branch information
Showing
46 changed files
with
1,000 additions
and
399 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,26 @@ | ||
on: | ||
pull_request: | ||
types: closed | ||
|
||
jobs: | ||
check_pr_merged: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Check PR Merged | ||
id: check_pr_merged | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const prUrl = context.payload.pull_request.html_url ?? context.payload.pull_request._links.html.href; | ||
core.setOutput('pullRequestLink', JSON.stringify(prUrl)); | ||
- name: Send Slack Trigger | ||
run: | | ||
curl -X POST https://api-slack.internal.bcsdlab.com/api/pr-merged/frontend \ | ||
-H 'Content-Type: application/json' \ | ||
-d '{ | ||
"pullRequestLink": ${{ steps.check_pr_merged.outputs.pullRequestLink }} | ||
}' |
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
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,15 @@ | ||
import { accessClient } from 'api'; | ||
import { DiningImages, SoldOut } from 'model/Coop'; | ||
|
||
export const getDining = async () => { | ||
const { data } = await accessClient.get('/dinings'); | ||
return data; | ||
}; | ||
|
||
export const uploadDiningImage = async (data: DiningImages) => { | ||
await accessClient.patch<DiningImages>('/coop/dining/image', data); | ||
}; | ||
|
||
export const updateSoldOut = async (data: SoldOut) => { | ||
await accessClient.patch<SoldOut>('/coop/dining/soldout', data); | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,41 @@ | ||
import z from 'zod'; | ||
|
||
export type Menus = '아침' | '점심' | '저녁'; | ||
|
||
export type DiningTypes = 'BREAKFAST' | 'LUNCH' | 'DINNER'; | ||
|
||
export const DINING_TYPES: Record<Menus, DiningTypes> = { | ||
아침: 'BREAKFAST', | ||
점심: 'LUNCH', | ||
저녁: 'DINNER', | ||
}; | ||
|
||
export const Dinings = z.object({ | ||
date: z.string(), | ||
id: z.number(), | ||
kcal: z.number(), | ||
menu: z.array(z.string()), | ||
place: z.string(), | ||
price_card: z.number(), | ||
price_cash: z.number(), | ||
type: z.string(), | ||
updated_at: z.string(), | ||
sold_out: z.boolean(), | ||
is_changed: z.boolean(), | ||
}); | ||
|
||
export type Dinings = z.infer<typeof Dinings>; | ||
|
||
export const DiningImages = z.object({ | ||
menuId: z.number(), | ||
imageUrl: z.string(), | ||
}); | ||
|
||
export type DiningImages = z.infer<typeof DiningImages>; | ||
|
||
export const SoldOut = z.object({ | ||
menuId: z.number(), | ||
soldOut: z.boolean(), | ||
}); | ||
|
||
export type SoldOut = z.infer<typeof SoldOut>; |
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,12 @@ | ||
import { AxiosError } from 'axios'; | ||
|
||
export interface KoinError { | ||
type: 'KOIN_ERROR'; | ||
status: number; | ||
code: number; | ||
message: string; | ||
} | ||
|
||
export interface CustomAxiosError extends AxiosError { | ||
type: 'AXIOS_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
Oops, something went wrong.