fix(accounts): separate Debrid-Link username and email
Persist the username and email returned by the Debrid-Link account endpoint as distinct identity fields and project them into their matching account-table columns. Migrate cached legacy statuses that stored a username in the email field, preserve both fields through renderer validation and sanitization, and cover API responses with and without an email address.
This commit is contained in:
@@ -103,6 +103,7 @@ export function sanitizeDebridAccountStatus(status: DebridAccountStatus, redacti
|
||||
accountId: sanitizeAccountStatusText(status.accountId, redactions),
|
||||
label: sanitizeAccountStatusText(status.label, redactions),
|
||||
maskedLogin: sanitizeAccountStatusText(status.maskedLogin, redactions),
|
||||
username: status.username ? sanitizeAccountStatusText(status.username, redactions) : undefined,
|
||||
email: status.email ? sanitizeAccountStatusText(status.email, redactions) : undefined,
|
||||
message: sanitizeAccountStatusText(status.message, redactions)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user