Skip to content

Commit

Permalink
feat: 필수 교양 과목 api 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolyi committed Apr 1, 2024
1 parent bc09dc5 commit 06657db
Show file tree
Hide file tree
Showing 27 changed files with 17 additions and 232 deletions.
6 changes: 4 additions & 2 deletions actions/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ export const getMockAuth = async () => {
const cookie = resp.headers.getSetCookie()[0];
const value = cookie.split(/=|;/)[1];

// TODO: 실 배포시 secure 옵션 주기
cookies().set(COOKIE_SESSION_ID, value, { httpOnly: true });
cookies().set(COOKIE_SESSION_ID, value, {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
});
};

export const removeAuth = () => {
Expand Down
4 changes: 4 additions & 0 deletions apis/academics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
CourseChange,
Curriculum,
DegreeRequirements,
GeneralStudiesRequirements,
Scholarship,
ScholarshipList,
} from '@/types/academics';
Expand Down Expand Up @@ -34,3 +35,6 @@ export const getScholarship = (id: number) =>

export const getDegreeRequirements = () =>
getRequest<DegreeRequirements>(`/academics/undergraduate/degree-requirements`);

export const getGeneralStudiesRequirements = (type: 'undergraduate' | 'graduate') =>
getRequest<GeneralStudiesRequirements>(`/academics/${type}/general-studies-requirements`);
5 changes: 0 additions & 5 deletions apis/academicsServer.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/.internal/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// TODO: 디자인 적용
export default async function RootLayout({
children,
params,
Expand Down
1 change: 0 additions & 1 deletion app/[locale]/about/greetings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-irregular-whitespace */
import Image from 'next/image';

import greetings from '@/public/image/about/greetings.jpg';
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/about/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Attachment from '@/components/common/Attachments';
import Attachments from '@/components/common/Attachments';
import HTMLViewer from '@/components/editor/HTMLViewer';
import PageLayout from '@/components/layout/pageLayout/PageLayout';

Expand All @@ -8,7 +8,7 @@ export default async function PrivacyPolicyPage() {
{/* TODO: PR 합친 후 매직 넘버 없애기 */}
<div className="mr-[300px]" style={{ marginLeft: '100px' }}>
<HTMLViewer htmlContent={htmlContent} />
<Attachment files={[file]} />
<Attachments files={[file]} />
</div>
</PageLayout>
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { getGeneralStudiesRequirements } from '@/apis/academicsServer';
import { getGeneralStudiesRequirements } from '@/apis/academics';

import Accordion from '@/app/[locale]/academics/undergraduate/general-studies-requirements/Accordion';

import HTMLViewer from '@/components/editor/HTMLViewer';
import PageLayout from '@/components/layout/pageLayout/PageLayout';

import SubjectChanges from './SubjectChanges';

export default async function UndergraduateGeneralStudiesRequirements() {
const { overview, subjectChanges, generalStudies } = await getGeneralStudiesRequirements();
const { overview, subjectChanges, generalStudies } = await getGeneralStudiesRequirements(
'undergraduate',
);

return (
<PageLayout titleType="big">
Expand All @@ -16,7 +17,7 @@ export default async function UndergraduateGeneralStudiesRequirements() {

<ContentTitle title={'교양 교과과정 변경 내역'} />
<div className="mb-5 mt-2.5">
{subjectChanges?.map((change, idx) => <SubjectChanges key={idx} {...change} />)}
<HTMLViewer htmlContent={subjectChanges} />
</div>

<ContentTitle title={'[학번별] 영역별 교양과목 학점 배분 구조표'} />
Expand Down
1 change: 0 additions & 1 deletion data/htmls/generalStudies/generalStudies_2007.txt

This file was deleted.

1 change: 0 additions & 1 deletion data/htmls/generalStudies/generalStudies_2008.txt

This file was deleted.

1 change: 0 additions & 1 deletion data/htmls/generalStudies/generalStudies_2009.txt

This file was deleted.

Loading

0 comments on commit 06657db

Please sign in to comment.