- Add deleteKeySchema for proper FormData validation
- Return { deleted: true } from deleteKey for change tracking
- Use $state for keysPromise to refresh list after create/delete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
10 lines
222 B
TypeScript
10 lines
222 B
TypeScript
import { object, string, pipe, minLength } from 'valibot';
|
|
|
|
export const createKeySchema = object({
|
|
name: pipe(string(), minLength(1))
|
|
});
|
|
|
|
export const deleteKeySchema = object({
|
|
keyId: pipe(string(), minLength(1))
|
|
});
|