mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-23 22:29:33 +01:00
feat(cases): rename a case and its folder, with a lock and live-session handling
This commit is contained in:
1 parent
002de32a08
commit
ab0bc0aecd
14 files changed
+884
No files matched your search
@@ -1992,6 +1992,21 @@ export const LinkCaseSchema = z.object({
|
||||
path: safePathSchema,
|
||||
});
|
||||
|
||||
/** POST /api/cases/:name/rename */
|
||||
export const RenameCaseSchema = z
|
||||
.object({
|
||||
newName: z
|
||||
.string()
|
||||
.min(1)
|
||||
.max(100)
|
||||
.regex(/^[a-zA-Z0-9_-]+$/, 'Invalid case name format. Use only letters, numbers, hyphens, underscores.'),
|
||||
/** Linked cases only: also rename the real folder on disk (a case under the cases directory always moves). */
|
||||
renameFolder: z.boolean().optional(),
|
||||
/** Stop the live sessions that have the folder open, instead of refusing with the list of them. */
|
||||
stopSessions: z.boolean().optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
/** PUT /api/cases/order */
|
||||
export const CaseOrderSchema = z.object({
|
||||
order: z.array(z.string().regex(/^[a-zA-Z0-9_-]+$/, 'Invalid case name format')),
|
||||
|
||||
Reference in new issue
Block a user