adjustment: updated to use project slug

This commit is contained in:
Sheen Capadngan
2024-05-10 22:34:16 +08:00
parent 3fff272cb3
commit b93aaffe77
8 changed files with 31 additions and 15 deletions
@@ -196,10 +196,10 @@ export const useUpdateFolderBatch = () => {
const queryClient = useQueryClient();
return useMutation<{}, {}, TUpdateFolderBatchDTO>({
mutationFn: async ({ projectId, folders }) => {
mutationFn: async ({ projectSlug, folders }) => {
const { data } = await apiRequest.patch("/api/v1/folders/batch", {
folders,
workspaceId: projectId
projectSlug,
folders
});
return data;
@@ -39,6 +39,7 @@ export type TDeleteFolderDTO = {
export type TUpdateFolderBatchDTO = {
projectId: string;
projectSlug: string;
folders: {
name: string;
environment: string;
@@ -278,8 +278,9 @@ export const SecretOverviewPage = () => {
try {
await updateFolderBatch({
projectId: workspaceId,
folders: updatedFolders
projectSlug,
folders: updatedFolders,
projectId: workspaceId
});
createNotification({
type: "success",