feat: track imported accounts per upstream key across platforms
Add upstream_key_account_links table mapping generated keys to remote accounts per website/platform, surface imported_accounts on key responses, and update website sync/routers to manage the links.
This commit is contained in:
@@ -134,13 +134,17 @@ def normalize_groups(value: Any) -> list[dict[str, Any]]:
|
||||
name = item.get("name") or item.get("group_name") or str(gid)
|
||||
rate = item.get("rate_multiplier") or item.get("rateMultiplier") or item.get("ratio")
|
||||
desc = item.get("description") or item.get("desc") or item.get("remark")
|
||||
groups.append({
|
||||
platform = item.get("platform")
|
||||
group = {
|
||||
"id": str(gid),
|
||||
"name": str(name),
|
||||
"rate_multiplier": fixed_decimal_string(rate, 2) if rate is not None else None,
|
||||
"description": str(desc) if desc is not None else None,
|
||||
"raw": item,
|
||||
})
|
||||
}
|
||||
if platform is not None:
|
||||
group["platform"] = str(platform)
|
||||
groups.append(group)
|
||||
return groups
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user