MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / getTier

Function getTier

src/middleware.ts:63–68  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

61}
62
63function getTier(pathname: string): keyof typeof rateMaps {
64 if (pathname === "/api/summarize") return "ai";
65 if (pathname === "/api/sync" || pathname === "/api/geo-enhance") return "admin";
66 if (pathname === "/api/trade/balance") return "balance";
67 return "read";
68}
69
70function getClientIP(req: NextRequest): string {
71 return (

Callers 1

middlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected