Skip to content

Commit

Permalink
πŸ”₯ μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 파일/μ½”λ“œ 제거 (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolyi authored Dec 8, 2024
1 parent 45099ae commit ca4fe93
Show file tree
Hide file tree
Showing 308 changed files with 903 additions and 894 deletions.
2 changes: 1 addition & 1 deletion actions/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { revalidateTag } from 'next/cache';

import { FutureCareers } from '@/apis/types/about';
import { putContact } from '@/apis/v2/about/contact';
import { putDirections } from '@/apis/v2/about/directions/[id]';
import { postFacility } from '@/apis/v2/about/facilities';
Expand Down Expand Up @@ -36,7 +37,6 @@ import {
studentClubs,
} from '@/constants/segmentNode';
import { redirectKo } from '@/i18n/routing';
import { FutureCareers } from '@/types/about';
import { getPath } from '@/utils/page';
import { decodeFormDataFileName } from '@/utils/string';

Expand Down
16 changes: 8 additions & 8 deletions actions/academics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

import { revalidateTag } from 'next/cache';

import {
Course,
Curriculum,
GeneralStudiesRequirement,
Scholarship,
StudentType,
} from '@/apis/types/academics';
import { deleteCourseChanges } from '@/apis/v1/academics/[studentType]/course-changes/[year]';
import { putAcademicsGuide } from '@/apis/v1/academics/[studentType]/guide';
import {
Expand All @@ -28,17 +35,10 @@ import {
FETCH_TAG_GUIDE,
FETCH_TAG_SCHOLARSHIP,
} from '@/constants/network';
import { graduateScholarship, undergraduateScholarship } from '@/constants/segmentNode';
import { redirect } from '@/i18n/routing';
import {
Course,
Curriculum,
GeneralStudiesRequirement,
Scholarship,
StudentType,
} from '@/types/academics';
import { WithLanguage } from '@/types/language';
import { getPath } from '@/utils/page';
import { graduateScholarship, undergraduateScholarship } from '@/constants/segmentNode';
import { decodeFormDataFileName } from '@/utils/string';

import { withErrorHandler } from './errorHandler';
Expand Down
2 changes: 1 addition & 1 deletion actions/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { revalidateTag } from 'next/cache';

import { ImportantPostIdentifier } from '@/apis/types/admin';
import { patchMultipleImportants } from '@/apis/v1/admin/important';
import { patchMultipleSlides } from '@/apis/v1/admin/slide';
import {
Expand All @@ -11,7 +12,6 @@ import {
FETCH_TAG_SEMINAR,
FETCH_TAG_SLIDE,
} from '@/constants/network';
import { ImportantPostIdentifier } from '@/types/admin';

export const batchUnslideAction = async (ids: number[]) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion actions/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { revalidateTag } from 'next/cache';
import { postNews } from '@/apis/v1/news';
import { deleteNews, patchNews } from '@/apis/v1/news/[id]';
import { FETCH_TAG_NEWS } from '@/constants/network';
import { news } from '@/constants/segmentNode';
import { redirectKo } from '@/i18n/routing';
import { getPath } from '@/utils/page';
import { news } from '@/constants/segmentNode';
import { decodeFormDataFileName } from '@/utils/string';

const newsPath = getPath(news);
Expand Down
2 changes: 1 addition & 1 deletion actions/notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { revalidateTag } from 'next/cache';
import { batchDeleteNotice, batchUnpinNotice, postNotice } from '@/apis/v1/notice';
import { deleteNotice, patchNotice } from '@/apis/v1/notice/[id]';
import { FETCH_TAG_NOTICE } from '@/constants/network';
import { notice } from '@/constants/segmentNode';
import { redirectKo } from '@/i18n/routing';
import { errorToStr } from '@/utils/error';
import { getPath } from '@/utils/page';
import { notice } from '@/constants/segmentNode';
import { decodeFormDataFileName } from '@/utils/string';

const noticePath = getPath(notice);
Expand Down
4 changes: 2 additions & 2 deletions actions/people.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import { revalidateTag } from 'next/cache';

import { FacultyStatus } from '@/apis/types/people';
import { postFaculty } from '@/apis/v2/professor';
import { deleteFaculty, putFaculty } from '@/apis/v2/professor/[id_ko]/[id_en]';
import { postStaff } from '@/apis/v2/staff';
import { deleteStaff, putStaff } from '@/apis/v2/staff/[id_ko]/id_en';
import { FETCH_TAG_FACULTY, FETCH_TAG_STAFF } from '@/constants/network';
import { emeritusFaculty, faculty, staff } from '@/constants/segmentNode';
import { redirect } from '@/i18n/routing';
import { Language, WithLanguage } from '@/types/language';
import { FacultyStatus } from '@/types/people';
import { getPath } from '@/utils/page';
import { emeritusFaculty, faculty, staff } from '@/constants/segmentNode';

import { withErrorHandler } from './errorHandler';

Expand Down
2 changes: 1 addition & 1 deletion actions/recruitment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { revalidateTag } from 'next/cache';

import { putFacultyRecruitment } from '@/apis/v1/recruit';
import { FETCH_TAG_RECRUITMENT } from '@/constants/network';
import { facultyRecruitment } from '@/constants/segmentNode';
import { redirect } from '@/i18n/routing';
import { getPath } from '@/utils/page';
import { facultyRecruitment } from '@/constants/segmentNode';

import { withErrorHandler } from './errorHandler';

Expand Down
2 changes: 1 addition & 1 deletion actions/research.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
import { postResearchLab } from '@/apis/v2/research/lab';
import { deleteResearchLab, putResearchLab } from '@/apis/v2/research/lab/[id_ko]/[id_en]';
import { FETCH_TAG_CENTER, FETCH_TAG_GROUP, FETCH_TAG_LAB } from '@/constants/network';
import { researchCenters, researchGroups, researchLabs } from '@/constants/segmentNode';
import { redirectKo } from '@/i18n/routing';
import { WithLanguage } from '@/types/language';
import { getPath } from '@/utils/page';
import { researchCenters, researchGroups, researchLabs } from '@/constants/segmentNode';
import { decodeFormDataFileName } from '@/utils/string';

import { withErrorHandler } from './errorHandler';
Expand Down
2 changes: 1 addition & 1 deletion actions/reservation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { revalidateTag } from 'next/cache';

import { Reservation, ReservationPostBody, ReservationPreview } from '@/apis/types/reservation';
import { FETCH_TAG_RESERVATION } from '@/constants/network';
import { Reservation, ReservationPostBody, ReservationPreview } from '@/types/reservation';

import { deleteRequest, getRequest, postRequest } from '../apis';
import { withErrorHandler } from './errorHandler';
Expand Down
2 changes: 1 addition & 1 deletion actions/seminar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { revalidateTag } from 'next/cache';
import { postSeminar } from '@/apis/v1/seminar';
import { deleteSeminar, patchSeminar } from '@/apis/v1/seminar/[id]';
import { FETCH_TAG_SEMINAR } from '@/constants/network';
import { seminar } from '@/constants/segmentNode';
import { redirectKo } from '@/i18n/routing';
import { getPath } from '@/utils/page';
import { seminar } from '@/constants/segmentNode';
import { decodeFormDataFileName } from '@/utils/string';

const seminarPath = getPath(seminar);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion types/academics.ts β†’ apis/types/academics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Attachment } from '@/components/common/Attachments';

import { Language } from './language';
import { Language } from '../../types/language';

export type StudentType = 'undergraduate' | 'graduate';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion types/main.ts β†’ apis/types/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type AllMainNotice = {
graduate: MainNotice[];
};

export type MainNotice = {
type MainNotice = {
id: number;
title: string;
createdAt: string;
Expand Down
33 changes: 1 addition & 32 deletions types/news.ts β†’ apis/types/news.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface NewsPreview {
interface NewsPreview {
id: number;
title: string;
description: string;
Expand Down Expand Up @@ -40,34 +40,3 @@ export interface News {

date: string;
}

export interface POSTNewsBody {
request: {
title: string;
titleForMain: string | null;
description: string;
isPrivate: boolean;
isSlide: boolean;
isImportant: boolean;
tags: string[];
date: string;
};
mainImage: File | null;
attachments: File[];
}

export interface PATCHNewsBody {
request: {
title: string;
titleForMain: string | null;
description: string;
isPrivate: boolean;
isSlide: boolean;
isImportant: boolean;
tags: string[];
deleteIds: number[];
date: string;
};
mainImage: File | null;
newAttachments: File[];
}
27 changes: 0 additions & 27 deletions types/notice.ts β†’ apis/types/notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,3 @@ export interface Notice {
bytes: number;
}[];
}

export interface POSTNoticeBody {
request: {
title: string;
titleForMain: string | null;
description: string;
isPrivate: boolean;
isPinned: boolean;
isImportant: boolean;
tags: string[];
};
attachments: File[];
}

export interface PatchNoticeBody {
request: {
title: string;
titleForMain: string | null;
description: string;
isPrivate: boolean;
isPinned: boolean;
isImportant: boolean;
tags: string[];
deleteIds: number[];
};
newAttachments: File[];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions types/search.ts β†’ apis/types/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export type NewsSearchResult = {

// ꡬ성원 νƒ­

export type MemberType = 'PROFESSOR' | 'STAFF';
type MemberType = 'PROFESSOR' | 'STAFF';

export type Member = {
id: 0;
Expand Down Expand Up @@ -87,7 +87,7 @@ export type ResearchSearchResult = {

// μž…ν•™ νƒ­

export type AcademicType =
type AcademicType =
| 'GUIDE' // μ•ˆλ‚΄
| 'GENERAL_STUDIES_REQUIREMENTS'
| 'GENERAL_STUDIES_REQUIREMENTS_SUBJECT_CHANGES'
Expand All @@ -97,12 +97,12 @@ export type AcademicType =
| 'COURSE_CHANGES' // ꡐ과λͺ©λ³€κ²½λ‚΄μ—­
| 'SCHOLARSHIP'; // μ‚¬μš© μ•ˆν•¨. PostType을 λŒ€μ‹  μ‚¬μš©

export type PostType =
type PostType =
| 'ACADEMICS'
| 'COURSE' // ꡐ과과정
| 'SCHOLARSHIP';

export type StudentType = 'UNDERGRADUATE' | 'GRADUATE';
type StudentType = 'UNDERGRADUATE' | 'GRADUATE';

export type Academic = {
id: 0;
Expand Down
48 changes: 48 additions & 0 deletions apis/types/seminar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
export interface SeminarPreviewList {
total: number;
searchList: SeminarPreview[];
}

export interface SeminarPreview {
id: number;
title: string;
description: string;
name: string;
affiliation: string;
startDate: string;
location: string;
imageURL: string | null;
isYearLast: boolean;
}

export interface Seminar {
affiliation: string | null;
affiliationURL: string | null;
attachments: {
id: number;
name: string;
url: string;
bytes: number;
}[];
createdAt: string;
description: string | null;
endDate: string | null;
host: string | null;
id: number;
imageURL: string | null;
introduction: string | null;
isImportant: boolean;
isPrivate: boolean;
location: string;
modifiedAt: string;
name: string | null;
nextId: number | null;
nextTitle: string | null;
prevId: number | null;
prevTitle: string | null;
speakerTitle: string | null;
speakerURL: string | null;
startDate: string;
title: string;
titleForMain: string;
}
2 changes: 1 addition & 1 deletion apis/v1/about/contact.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getRequest } from '@/apis';
import { AboutContent } from '@/apis/types/about';
import { FETCH_TAG_CONTACT } from '@/constants/network';
import { AboutContent } from '@/types/about';
import { Language } from '@/types/language';

export const getContact = (language: Language) =>
Expand Down
2 changes: 1 addition & 1 deletion apis/v1/about/future-careers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getRequest } from '@/apis';
import { FutureCareers } from '@/apis/types/about';
import { FETCH_TAG_CAREER } from '@/constants/network';
import { FutureCareers } from '@/types/about';
import { Language } from '@/types/language';

export const getFutureCareeres = (language: Language) =>
Expand Down
2 changes: 1 addition & 1 deletion apis/v1/about/greetings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getRequest } from '@/apis';
import { AboutContent } from '@/apis/types/about';
import { FETCH_TAG_GREETINGS } from '@/constants/network';
import { AboutContent } from '@/types/about';
import { Language } from '@/types/language';

export const getGreetings = (language: Language) =>
Expand Down
2 changes: 1 addition & 1 deletion apis/v1/about/history.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getRequest } from '@/apis';
import { AboutContent } from '@/apis/types/about';
import { FETCH_TAG_HISTORY } from '@/constants/network';
import { AboutContent } from '@/types/about';
import { Language } from '@/types/language';

export const getHistory = (language: Language) =>
Expand Down
2 changes: 1 addition & 1 deletion apis/v1/about/overview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getRequest } from '@/apis';
import { AboutContent } from '@/apis/types/about';
import { FETCH_TAG_OVERVIEW } from '@/constants/network';
import { AboutContent } from '@/types/about';
import { Language } from '@/types/language';

export const getOverview = (language: Language) =>
Expand Down
2 changes: 1 addition & 1 deletion apis/v1/about/search/top.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getRequest } from '@/apis';
import { AboutSearchResult, SearchParam } from '@/types/search';
import { AboutSearchResult, SearchParam } from '@/apis/types/search';

export const searchAbout = (params: SearchParam) =>
getRequest('/v1/about/search/top', params) as Promise<AboutSearchResult>;
Loading

0 comments on commit ca4fe93

Please sign in to comment.