From f05c75e5da0a0b28be9032f8506201e17c0380e4 Mon Sep 17 00:00:00 2001 From: yougyung Date: Thu, 14 Mar 2024 13:08:49 +0900 Subject: [PATCH] fix: change variable name --- app/(sub-page)/grade-upload/page.tsx | 4 ++-- app/business/api-path.ts | 2 +- app/business/lecture/taken-lecture.command.ts | 4 ++-- app/mocks/handlers.mock.ts | 2 +- app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/(sub-page)/grade-upload/page.tsx b/app/(sub-page)/grade-upload/page.tsx index 443fe8b9..5f536634 100644 --- a/app/(sub-page)/grade-upload/page.tsx +++ b/app/(sub-page)/grade-upload/page.tsx @@ -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 ( - + ); } diff --git a/app/business/api-path.ts b/app/business/api-path.ts index d59451b3..c05f51fe 100644 --- a/app/business/api-path.ts +++ b/app/business/api-path.ts @@ -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`, }; diff --git a/app/business/lecture/taken-lecture.command.ts b/app/business/lecture/taken-lecture.command.ts index 75fb5e01..9bbd43f4 100644 --- a/app/business/lecture/taken-lecture.command.ts +++ b/app/business/lecture/taken-lecture.command.ts @@ -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 }), }); diff --git a/app/mocks/handlers.mock.ts b/app/mocks/handlers.mock.ts index 1d7fd71d..b4bd6cca 100644 --- a/app/mocks/handlers.mock.ts +++ b/app/mocks/handlers.mock.ts @@ -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 }); }), diff --git a/app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx b/app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx index 5f3e9a3e..69a87870 100644 --- a/app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx +++ b/app/ui/lecture/upload-taken-lecture/upload-taken-lecture.tsx @@ -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 ( -
+