MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / isDeleteProjectCachePayload

Function isDeleteProjectCachePayload

src/app/api/wiki/projects/route.ts:22–31  ·  view source on GitHub ↗

Type guard to validate DeleteProjectCachePayload at runtime

(obj: unknown)

Source from the content-addressed store, hash-verified

20
21/** Type guard to validate DeleteProjectCachePayload at runtime */
22function isDeleteProjectCachePayload(obj: unknown): obj is DeleteProjectCachePayload {
23 return (
24 obj != null &&
25 typeof obj === 'object' &&
26 'owner' in obj && typeof (obj as Record<string, unknown>).owner === 'string' && ((obj as Record<string, unknown>).owner as string).trim() !== '' &&
27 'repo' in obj && typeof (obj as Record<string, unknown>).repo === 'string' && ((obj as Record<string, unknown>).repo as string).trim() !== '' &&
28 'repo_type' in obj && typeof (obj as Record<string, unknown>).repo_type === 'string' && ((obj as Record<string, unknown>).repo_type as string).trim() !== '' &&
29 'language' in obj && typeof (obj as Record<string, unknown>).language === 'string' && ((obj as Record<string, unknown>).language as string).trim() !== ''
30 );
31}
32
33// Ensure this matches your Python backend configuration
34const PYTHON_BACKEND_URL = process.env.PYTHON_BACKEND_HOST || 'http://localhost:8001';

Callers 1

DELETEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected