Skip to content

Commit

Permalink
fix: change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
yougyung committed Mar 14, 2024
1 parent a7486e6 commit f05c75e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/(sub-page)/grade-upload/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import ContentContainer from '../../ui/view/atom/content-container';
import Manual from './components/manual';
import UploadGradeCard from '../../ui/lecture/upload-taken-lecture/upload-taken-lecture';
import UploadTakenLecture from '../../ui/lecture/upload-taken-lecture/upload-taken-lecture';

export default function GradeUploadPage() {
return (
<ContentContainer className="flex flex-col justify-center gap-8 min-h-[70vh]">
<Manual />
<UploadGradeCard />
<UploadTakenLecture />
</ContentContainer>
);
}
2 changes: 1 addition & 1 deletion app/business/api-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const BASE_URL = process.env.API_MOCKING === 'enable' ? 'http://localhost:9090'

export const API_PATH = {
revenue: `${BASE_URL}/revenue`,
registUserGrade: `${BASE_URL}/registUserGrade`,
registerUserGrade: `${BASE_URL}/registerUserGrade`,
parsePDFtoText: `${BASE_URL}/parsePDFtoText`,
takenLectures: `${BASE_URL}/taken-lectures`,
};
4 changes: 2 additions & 2 deletions app/business/lecture/taken-lecture.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { FormState } from '@/app/ui/view/molecule/form/form-root';
import { API_PATH } from '../api-path';

export const registUserGrade = async (prevState: FormState, formData: FormData) => {
export const registerUserGrade = async (prevState: FormState, formData: FormData) => {
const parsingText = await parsePDFtoText(formData);

const res = await fetch(API_PATH.registUserGrade, {
const res = await fetch(API_PATH.registerUserGrade, {
method: 'POST',
body: JSON.stringify({ parsingText }),
});
Expand Down
2 changes: 1 addition & 1 deletion app/mocks/handlers.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const handlers = [
return HttpResponse.json(parsePDF);
}),

http.post(API_PATH.registUserGrade, async () => {
http.post(API_PATH.registerUserGrade, async () => {
await delay(1000);
throw new HttpResponse(null, { status: 200 });
}),
Expand Down
4 changes: 2 additions & 2 deletions app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client';

import { registUserGrade } from '@/app/business/lecture/taken-lecture.command';
import { registerUserGrade } from '@/app/business/lecture/taken-lecture.command';
import UploadPdf from '@/app/ui/view/molecule/upload-pdf/upload-pdf';
import Form from '../../view/molecule/form';

function UploadTakenLecture() {
return (
<Form action={registUserGrade} id="성적업로드">
<Form action={registerUserGrade} id="성적업로드">
<UploadPdf />
<Form.SubmitButton label="결과 보러가기" position="center" size="md" />
</Form>
Expand Down

0 comments on commit f05c75e

Please sign in to comment.