generated from GSM-MSG/MSG-Repository-Generator
-
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.
Co-authored-by: 송현우 <[email protected]> Co-authored-by: 이아론 <[email protected]> Co-authored-by: 정태관 <[email protected]> Co-authored-by: 태윤 <[email protected]>
- Loading branch information
1 parent
b03ce32
commit 7523b62
Showing
263 changed files
with
13,468 additions
and
11,804 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
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 +1 @@ | ||
18.13.0 | ||
20 |
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 |
---|---|---|
@@ -1,29 +1,10 @@ | ||
import axios from 'axios' | ||
import qs from 'qs' | ||
import ParamsFilter from '@lib/ParamsFilter' | ||
import axiosRetry from 'axios-retry' | ||
|
||
const axiosApi = axios.create({ | ||
'axios-retry': { | ||
retries: 3, | ||
retryCondition: (e) => e.response?.status === 401, | ||
}, | ||
paramsSerializer: (params) => | ||
qs.stringify(ParamsFilter(params), { arrayFormat: 'repeat' }), | ||
}) | ||
|
||
axiosRetry(axiosApi, { | ||
retries: 3, | ||
retryDelay: (retryCount) => { | ||
return retryCount * 1000 | ||
}, | ||
shouldResetTimeout: true, | ||
retryCondition: (error) => { | ||
return ( | ||
axiosRetry.isNetworkOrIdempotentRequestError(error) || | ||
error.response?.status === 401 | ||
) | ||
}, | ||
}) | ||
|
||
export default axiosApi |
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 @@ | ||
export { default as axiosApi } from './axiosApi' | ||
export { default as rtkApi } from './rtkApi' |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
export { default as LoggedInResDto } from './res/LoggedInResDto' | ||
|
||
export type { LoggedInResType } from './res/LoggedInResDto' |
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 @@ | ||
import { z } from 'zod' | ||
import Role from '@/types/Role' | ||
|
||
const RoleSchema = z.enum([ | ||
Role.ROLE_STUDENT, | ||
Role.ROLE_TEACHER, | ||
Role.ROLE_DIRECTOR, | ||
Role.ROLE_HOMEROOM, | ||
Role.ROLE_PRINCIPAL, | ||
Role.ROLE_DEPUTY_PRINCIPAL, | ||
]) | ||
|
||
export const successDto = z.object({ | ||
isLoggedIn: z.literal(true), | ||
role: RoleSchema, | ||
}) | ||
|
||
export const failDto = z.object({ | ||
isLoggedIn: z.literal(false), | ||
}) | ||
|
||
const LoggedInResDto = z.discriminatedUnion('isLoggedIn', [successDto, failDto]) | ||
|
||
export type LoggedInResType = z.infer<typeof LoggedInResDto> | ||
|
||
export default LoggedInResDto |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.