feat(accounts): доработать управление аккаунтами хостеров
Docker / build (push) Has been cancelled

Добавить apiLogin из credentials, сводку и health-индикаторы на /accounts, фильтры, раздельную форму логина и пароля, безопасное удаление с 409 и тесты API/repository.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Denozordec
2026-06-28 16:53:51 +07:00
co-authored by Cursor
parent 06f5b27e53
commit c80090ed08
21 changed files with 844 additions and 84 deletions
@@ -0,0 +1,15 @@
/** Логин из BILLmanager-кредов формата `login:password`. */
export function parseApiLogin(credentials: string | null | undefined): string {
const cred = String(credentials ?? '').trim()
const idx = cred.indexOf(':')
return idx > 0 ? cred.slice(0, idx) : ''
}
/** Собрать креды для API из отдельных полей формы. */
export function buildApiCredentials(login: string, password: string): string {
const l = login.trim()
const p = password
if (!l && !p) return ''
if (!l) return p
return p ? `${l}:${p}` : ''
}