mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-07 13:45:01 +03:00
cd176faf4e
Reject reserved dot-segment client names and recover legacy records through query aliases. Preserve token scopes and path identity precedence, and update the generated API reference.
6 lines
284 B
TypeScript
6 lines
284 B
TypeScript
export function clientManagementPath(action: 'get' | 'update' | 'del', email: string): string {
|
|
const base = `/panel/api/clients/${action}`;
|
|
const encoded = encodeURIComponent(email);
|
|
return email === '.' || email === '..' ? `${base}?email=${encoded}` : `${base}/${encoded}`;
|
|
}
|