대민 수정 외 .env.mindone추가
This commit is contained in:
@@ -3,7 +3,6 @@ import { AUTH_USER_ID, CLAIM_NAME } from "@/src/shared/config";
|
||||
import { DEV_URL_FO, DEV_URL_WR } from "../config";
|
||||
import { getCookie } from "@common/components/lib/cookie";
|
||||
|
||||
const PROXY_HOST = process.env.NEXT_PUBLIC_PROXY_HOST;
|
||||
const tokenId = getCookie(AUTH_USER_ID);
|
||||
const Authorization = getCookie(CLAIM_NAME);
|
||||
|
||||
@@ -19,8 +18,7 @@ interface RequestParams {
|
||||
|
||||
export const getFetch = async (type: string, url: string) => {
|
||||
const baseUrl = type === fetchType.FO ? DEV_URL_FO : DEV_URL_WR;
|
||||
console.log("호출주소 ", PROXY_HOST+baseUrl + url);
|
||||
const response = await fetch(PROXY_HOST+baseUrl + url, {
|
||||
const response = await fetch(baseUrl + url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
accept: "application/json",
|
||||
@@ -37,7 +35,7 @@ export const getFetch = async (type: string, url: string) => {
|
||||
};
|
||||
|
||||
export const postFetch = async (url: string, params: RequestParams) => {
|
||||
const response = await fetch(PROXY_HOST+DEV_URL_WR + url, {
|
||||
const response = await fetch(DEV_URL_WR + url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -54,7 +52,7 @@ export const postFetch = async (url: string, params: RequestParams) => {
|
||||
};
|
||||
|
||||
export const putFetch = async (url: string, params: RequestParams) => {
|
||||
const response = await fetch(PROXY_HOST+DEV_URL_WR + url, {
|
||||
const response = await fetch(DEV_URL_WR + url, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -71,7 +69,7 @@ export const putFetch = async (url: string, params: RequestParams) => {
|
||||
};
|
||||
|
||||
export const deleteFetch = async (url: string, params: RequestParams) => {
|
||||
const response = await fetch(PROXY_HOST+DEV_URL_WR + url, {
|
||||
const response = await fetch(DEV_URL_WR + url, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user