diff --git a/package.json b/package.json index 751a97a9..cd1ce3e8 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "lottie-react": "^2.4.0", "postcss": "^8.4.38", "postcss-scss": "^4.0.9", - "qs": "^6.12.3", "react": "^18.3.1", "react-dom": "^18.3.1", "react-lottie-player": "^2.0.0", diff --git a/src/apis/domains/files/api.ts b/src/apis/domains/files/api.ts index 0bf9b0b4..c08ea796 100644 --- a/src/apis/domains/files/api.ts +++ b/src/apis/domains/files/api.ts @@ -1,6 +1,5 @@ import { get } from "@apis/index"; import axios, { AxiosResponse } from "axios"; -import qs from "qs"; interface ImageInterface { [key: string]: string; @@ -31,9 +30,13 @@ export const getPresignedUrl = async ( const response: AxiosResponse = await get("/files/presigned-url", { params: paramsWithEmptyArrays, paramsSerializer: (params) => { - const queryString = qs.stringify(params, { arrayFormat: "repeat" }); + const searchParams = new URLSearchParams(); - const modifiedQueryString = queryString + for (const [k, v] of Object.entries(params)) { + searchParams.set(k, v); + } + + const modifiedQueryString = searchParams.toString() .replace(/castImages=%5B%5D/g, "castImages") .replace(/staffImages=%5B%5D/g, "staffImages"); return modifiedQueryString; diff --git a/yarn.lock b/yarn.lock index f51bc692..d33c86af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4914,7 +4914,6 @@ __metadata: postcss-styled-syntax: "npm:^0.6.4" prettier: "npm:^3.3.2" prettier-linter-helpers: "npm:^1.0.0" - qs: "npm:^6.12.3" react: "npm:^18.3.1" react-dom: "npm:^18.3.1" react-lottie-player: "npm:^2.0.0" @@ -9804,15 +9803,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.12.3": - version: 6.12.3 - resolution: "qs@npm:6.12.3" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10c0/243ddcc8f49dab78fc51041f7f64c500b47c671c45a101a8aca565d8537cb562921da7ef1a831b4a7051596ec88bb35a0d5e25a240025e8b32c6bfb69f00bf2f - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3"