Skip to content

Commit e602f93

Browse files
committed
feat: add api handler
1 parent 9ceaecd commit e602f93

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/entities/evaluation/api/saveScore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const saveScore = async (
77
creativity_composition: number,
88
) => {
99
try {
10-
const res = await instance.patch("/judge/" + team_id, {
10+
const res = await instance.patch("/api/judge/" + team_id, {
1111
stage_manner_performance,
1212
completion_expression,
1313
creativity_composition,

src/entities/list/api/closeVote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { toast } from "sonner";
33

44
export const closeVote = async (id: string) => {
55
try {
6-
const res = await instance.delete(`/vote/${id}`);
6+
const res = await instance.delete(`/api/vote/${id}`);
77
if (res.status === 200) {
88
toast.success("투표가 종료되었습니다");
99
}

src/entities/list/api/openVote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { toast } from "sonner";
33

44
export const openVote = async (id: string) => {
55
try {
6-
const res = await instance.post(`/vote/${id}`);
6+
const res = await instance.post(`/api/vote/${id}`);
77
if (res.status === 200) {
88
toast.success("투표가 시작되었습니다");
99
}

src/shared/api/getVote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import instance from "@/shared/lib/axios";
22

33
export const getVote = async (team: string) => {
44
try {
5-
const res = await instance.get("/vote/" + team);
5+
const res = await instance.get("/api/vote/" + team);
66
return res.data;
77
} catch (error) {
88
throw error;

src/views/evaluation/api/getEvaluation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { toast } from "sonner";
33

44
export const getEvaluation = async (team_id: string) => {
55
try {
6-
const res = await instance.get("/judge/" + team_id);
6+
const res = await instance.get("/api/judge/" + team_id);
77
return res.data;
88
} catch (error) {
99
toast.error("현재 공연중인 팀이 존재하지 않습니다");

src/views/evaluation/api/getEvaluations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import instance from "@/shared/lib/axios";
22

33
export const getEvaluations = async () => {
44
try {
5-
const res = await instance.get("/judge");
5+
const res = await instance.get("/api/judge");
66
return res.data;
77
} catch (error) {
88
throw error;

src/views/rank/api/getRank.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import instance from "@/shared/lib/axios";
22

33
export const getRank = async () => {
44
try {
5-
const res = await instance.get("/team/ranking");
5+
const res = await instance.get("/api/team/ranking");
66
return res.data;
77
} catch (error) {
88
throw error;

src/views/vote/api/postVote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import axios from "axios";
33

44
export const postVote = async (star: number, team_id: number) => {
55
try {
6-
return await instance.post("vote", {
6+
return await instance.post("/api/vote", {
77
select: true,
88
star,
99
team_id,

0 commit comments

Comments
 (0)