From 6f05a6d82c51ff23f2aac4e898c6b63bc422c335 Mon Sep 17 00:00:00 2001 From: x032205 Date: Mon, 11 Aug 2025 17:11:33 -0700 Subject: [PATCH] feat(api): Return path for folder create, update, delete --- backend/src/db/schemas/secret-folders.ts | 3 ++- backend/src/server/routes/v1/secret-folder-router.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/db/schemas/secret-folders.ts b/backend/src/db/schemas/secret-folders.ts index 09e2fe8c1..799f2f24f 100644 --- a/backend/src/db/schemas/secret-folders.ts +++ b/backend/src/db/schemas/secret-folders.ts @@ -17,7 +17,8 @@ export const SecretFoldersSchema = z.object({ parentId: z.string().uuid().nullable().optional(), isReserved: z.boolean().default(false).nullable().optional(), description: z.string().nullable().optional(), - lastSecretModified: z.date().nullable().optional() + lastSecretModified: z.date().nullable().optional(), + path: z.string() }); export type TSecretFolders = z.infer; diff --git a/backend/src/server/routes/v1/secret-folder-router.ts b/backend/src/server/routes/v1/secret-folder-router.ts index b307347b8..cfc46ed99 100644 --- a/backend/src/server/routes/v1/secret-folder-router.ts +++ b/backend/src/server/routes/v1/secret-folder-router.ts @@ -45,7 +45,7 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => .transform(removeTrailingSlash) .describe(FOLDERS.CREATE.path) .optional(), - // backward compatiability with cli + // backward compatibility with cli directory: z .string() .trim() @@ -130,7 +130,7 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => .transform(removeTrailingSlash) .describe(FOLDERS.UPDATE.path) .optional(), - // backward compatiability with cli + // backward compatibility with cli directory: z .string() .trim() @@ -359,7 +359,7 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => .transform(removeTrailingSlash) .describe(FOLDERS.LIST.path) .optional(), - // backward compatiability with cli + // backward compatibility with cli directory: z .string() .trim()