MCPcopy Index your code
hub / github.com/simstudioai/sim / isValidEndpoint

Function isValidEndpoint

apps/sim/app/api/admin/mothership/route.ts:33–37  ·  view source on GitHub ↗
(endpoint: string)

Source from the content-addressed store, hash-verified

31const ENDPOINT_PATTERN = /^[a-zA-Z0-9_-]+(?:\/[a-zA-Z0-9_-]+)*$/
32
33function isValidEndpoint(endpoint: string): boolean {
34 if (!endpoint) return false
35 if (endpoint.includes('..')) return false
36 return ENDPOINT_PATTERN.test(endpoint)
37}
38
39async function getAuthorizedAdminUserId() {
40 const session = await getSession()

Callers 1

route.tsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected