mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 22:46:24 +00:00
Merge pull request #3174 from Infisical/feat/addFolderDescription
Add descriptions to secret folders
This commit is contained in:
@@ -148,12 +148,13 @@ export const useUpdateFolder = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<object, object, TUpdateFolderDTO>({
|
||||
mutationFn: async ({ path = "/", folderId, name, environment, projectId }) => {
|
||||
mutationFn: async ({ path = "/", folderId, name, environment, projectId, description }) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/folders/${folderId}`, {
|
||||
name,
|
||||
environment,
|
||||
workspaceId: projectId,
|
||||
path
|
||||
path,
|
||||
description
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@ export enum ReservedFolders {
|
||||
export type TSecretFolder = {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
export type TGetProjectFoldersDTO = {
|
||||
@@ -24,6 +25,7 @@ export type TCreateFolderDTO = {
|
||||
environment: string;
|
||||
name: string;
|
||||
path?: string;
|
||||
description?: string | null;
|
||||
};
|
||||
|
||||
export type TUpdateFolderDTO = {
|
||||
@@ -32,6 +34,7 @@ export type TUpdateFolderDTO = {
|
||||
name: string;
|
||||
folderId: string;
|
||||
path?: string;
|
||||
description?: string | null;
|
||||
};
|
||||
|
||||
export type TDeleteFolderDTO = {
|
||||
@@ -49,5 +52,6 @@ export type TUpdateFolderBatchDTO = {
|
||||
environment: string;
|
||||
id: string;
|
||||
path?: string;
|
||||
description?: string | null;
|
||||
}[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user