Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/api/admin/src/hooks/mission/usePostMission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import { useMutation } from '@tanstack/react-query';

import { post, missionQueryKeys, missionUrl } from 'api/common';

import { MissionDetailType } from 'types';

export const usePostMission = () =>
useMutation<
void,
Error,
{ title: string; content: string; timeLimit: number }
>(missionQueryKeys.postMission(), (newMission) =>
post(missionUrl.mission(), newMission)
useMutation<void, Error, MissionDetailType>(
missionQueryKeys.postMission(),
(newMission) => post(missionUrl.mission(), newMission)
);
2 changes: 1 addition & 1 deletion packages/api/admin/src/hooks/user/useGetSolveDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { userUrl, userQueryKeys, get } from 'api/common';

interface SolveDetailResponseType {
solveId: string;
title: string;
title: String;
solvation: string;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/api/common/src/hooks/auth/usePostLoginCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useMutation } from '@tanstack/react-query';

import { post, authQueryKeys, authUrl } from 'api/common';

import { TokenResponseType } from 'types';
import { TokenResponseLoginType } from 'types';

export const usePostLoginCode = () =>
useMutation<TokenResponseType, Error, { code: string }>(
useMutation<TokenResponseLoginType, Error, { code: string }>(
authQueryKeys.postLoginCode(),
(loginCode) => post(authUrl.auth(), loginCode),
{
Expand Down
5 changes: 2 additions & 3 deletions packages/api/common/src/libs/api/instance.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import axios from 'axios';

import { authUrl, patch } from 'api/common';
import { TokenResponseType } from 'types';
import { TokenResponseLoginType } from 'types';

export const apiInstance = axios.create({
baseURL: '/api',
withCredentials: true,
});

apiInstance.interceptors.request.use(
Expand Down Expand Up @@ -41,7 +40,7 @@ apiInstance.interceptors.response.use(

if (error.response.status === 401) {
try {
const data: TokenResponseType = await patch(
const data: TokenResponseLoginType = await patch(
authUrl.auth(),
{},
{
Expand Down
2 changes: 0 additions & 2 deletions packages/types/src/orderdItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export interface OrderdItemType {
id: string;
count: number;
price: number;
orderStatus: 'IS_ORDERED' | 'COMPLETED';
item: {
id: string;
name: string;
Expand All @@ -11,7 +10,6 @@ export interface OrderdItemType {
};
user: {
id: string;
email: string;
name: string;
profileImage: string;
};
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export interface RankingPropsType {
cumulatePoint: number;
user: {
id: string;
email: string;
name: string;
profileImage: string | null;
};
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/scoringListType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export interface ScoringListType {
point: number;
user: {
id: string;
email: string;
name: string;
profileImage: string | '';
};
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/shopItem.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export interface ShopItemType {
itemId: string;
name: string;
text: string;
price: number;
image: string;
}
1 change: 0 additions & 1 deletion packages/types/src/studentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export interface StudentType {
currentPoint: number;
user: {
id: string;
email: string;
name: string;
profileImage: string | '';
};
Expand Down
3 changes: 3 additions & 0 deletions packages/types/src/tokenResponseType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ export interface TokenResponseType {
accessToken: string; // 30분
refreshToken: string; // 1주일
expiredAt: string;
}

export interface TokenResponseLoginType extends TokenResponseType {
authority: 'ROLE_STUDENT' | 'ROLE_TEACHER';
}
2 changes: 0 additions & 2 deletions projects/admin/src/PageContainer/GradingPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { useGetSolveDetail, usePostScoringResult } from 'api/admin';

import { useState } from 'react';

import { SolveStatus } from 'types';

import { toast } from 'react-toastify';

import { useRouter } from 'next/navigation';
Expand Down
4 changes: 0 additions & 4 deletions projects/admin/src/components/ShopItemCard/index.stories.tsx

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions projects/client/src/components/RankingHeader/index.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const Primary: Story = {
cumulatePoint: 1000,
user: {
id: 'sampleId',
email: 'sample@gmail.com',
name: 'user',
profileImage:
'https://s3.ap-northeast-2.amazonaws.com/st.dangidata/billing/course/image/133823_20230516174511852.png',
Expand All @@ -36,7 +35,6 @@ export const Secondary: Story = {
cumulatePoint: 800,
user: {
id: 'sampleId',
email: 'sample@gmail.com',
name: '이태랑',
profileImage:
'https://s3.ap-northeast-2.amazonaws.com/st.dangidata/billing/course/image/133823_20230516174511852.png',
Expand Down
1 change: 0 additions & 1 deletion projects/client/src/components/ShopItem/index.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const Primary: Story = {
data: {
itemId: 'id',
name: '자장면',
text: '자장면',
price: 5000,
image:
'https://mblogthumb-phinf.pstatic.net/MjAxNzAxMjNfNDkg/MDAxNDg1MTYwMTQ1MDc5.H7I84KnCb0_U0Fb312NMMk10dbmNhdMb45jDiNYs13Eg.e3185KBkHafPDJpOjsZ7vvvH741l0TzEt2vVNvePS7Mg.JPEG.china_lab/shutterstock_524181190.jpg?type=w800',
Expand Down
2 changes: 0 additions & 2 deletions projects/client/src/components/ShopModal/index.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ export const Primary: Story = {
{
itemId: 'id',
name: '자장면1',
text: '자장면',
price: 5000,
image:
'https://mblogthumb-phinf.pstatic.net/MjAxNzAxMjNfNDkg/MDAxNDg1MTYwMTQ1MDc5.H7I84KnCb0_U0Fb312NMMk10dbmNhdMb45jDiNYs13Eg.e3185KBkHafPDJpOjsZ7vvvH741l0TzEt2vVNvePS7Mg.JPEG.china_lab/shutterstock_524181190.jpg?type=w800',
},
{
itemId: 'id',
name: '자장면2',
text: '자장면',
price: 5000,
image:
'https://mblogthumb-phinf.pstatic.net/MjAxNzAxMjNfNDkg/MDAxNDg1MTYwMTQ1MDc5.H7I84KnCb0_U0Fb312NMMk10dbmNhdMb45jDiNYs13Eg.e3185KBkHafPDJpOjsZ7vvvH741l0TzEt2vVNvePS7Mg.JPEG.china_lab/shutterstock_524181190.jpg?type=w800',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const Primary: Story = {
data: {
itemId: 'id',
name: '자장면1',
text: '자장면',
price: 5000,
image:
'https://mblogthumb-phinf.pstatic.net/MjAxNzAxMjNfNDkg/MDAxNDg1MTYwMTQ1MDc5.H7I84KnCb0_U0Fb312NMMk10dbmNhdMb45jDiNYs13Eg.e3185KBkHafPDJpOjsZ7vvvH741l0TzEt2vVNvePS7Mg.JPEG.china_lab/shutterstock_524181190.jpg?type=w800',
Expand Down