- {username}
+ {userData?.nickName}
- {userAccount === "GOOGLE" ? : }
- {useremail}
+ {userData?.provider === "GOOGLE" ? : }
+ {userData?.email}
{
+ return await client.get(`/api/experiences/${expId}`, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ });
+};
+
// 경험 수정
export const patchExperience = async (
expId: string,
expData: ExperienceType,
token: string
) => {
- return await client.patch(`/api/experiences/${expId}}`, expData, {
+ return await client.patch(`/api/experiences/${expId}`, expData, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ });
+};
+
+// 경험 삭제
+export const deleteExperience = async (expId: string, token: string) => {
+ return await client.delete(`/api/experiences/${expId}`, {
headers: {
Authorization: `Bearer ${token}`,
},
diff --git a/src/services/Experience/keywordApi.ts b/src/services/Experience/keywordApi.ts
index 5da3e64..8364af8 100644
--- a/src/services/Experience/keywordApi.ts
+++ b/src/services/Experience/keywordApi.ts
@@ -1,11 +1,11 @@
import client from "../client";
// 역량 키워드 등록
-export const postKeyword = async (name: { name: string }[], token: string) => {
+export const postKeyword = async (names: { name: string }[], token: string) => {
return await client.post(
`/api/strong-points`,
{
- names: name,
+ names: names,
},
{
headers: {
diff --git a/src/services/Experience/tagApi.tsx b/src/services/Experience/tagApi.tsx
index bd15d8d..6cd21e4 100644
--- a/src/services/Experience/tagApi.tsx
+++ b/src/services/Experience/tagApi.tsx
@@ -2,7 +2,7 @@ import client from "../client";
// 상위 태그 조회
export const getPrimeTags = async (token: string) => {
- return await client.get(`/api/tags`, {
+ return await client.get(`/api/tags/my`, {
headers: {
Authorization: `Bearer ${token}`,
},
diff --git a/src/store/jdStore.ts b/src/store/jdStore.ts
index 34c6159..5f5eac4 100644
--- a/src/store/jdStore.ts
+++ b/src/store/jdStore.ts
@@ -1,6 +1,6 @@
import { atom } from "recoil";
-export const detailStore = atom({
+export const detailStore = atom({
key: "detailId",
default: 0,
});
diff --git a/src/types/experience.ts b/src/types/experience.ts
index 889298e..ba49086 100644
--- a/src/types/experience.ts
+++ b/src/types/experience.ts
@@ -13,6 +13,17 @@ export interface ExperienceType {
endedAt: string;
}
+export interface ExperienceDetailType extends ExperienceType {
+ id: string;
+ title: string;
+ parentTag: TagType;
+ childTag: TagType;
+ strongPoints: KeywordType[];
+ contents: QuestionType[];
+ startedAt: string;
+ endedAt: string;
+}
+
export interface KeywordType {
id: string;
name: string;
diff --git a/src/types/user.ts b/src/types/user.ts
index 7be385d..e59450d 100644
--- a/src/types/user.ts
+++ b/src/types/user.ts
@@ -15,6 +15,7 @@ export interface UserDataType {
nickName: string;
jobSearchStatus: string;
desiredJob: string;
+ email: string;
goal: string;
dream: string;
}