mirror of
https://github.com/we-promise/sure.git
synced 2026-05-09 13:45:01 +00:00
* feat(api): expose sync status * fix(api): harden sync status review paths * fix(api): address sync status review * fix(api): tighten sync status review fixes * fix(api): address sync status review * test(api): avoid secret-like sync fixture key * test(api): reuse sync status fixture key * fix(api): align sync route helpers * fix(api): tighten sync status scoping * fix(api): make sync status schema nullable-compliant
25 lines
658 B
Ruby
25 lines
658 B
Ruby
# frozen_string_literal: true
|
|
|
|
syncable = sync.syncable
|
|
|
|
json.id sync.id
|
|
json.status sync.status
|
|
json.in_progress sync.in_progress?
|
|
json.terminal sync.terminal?
|
|
json.syncable do
|
|
json.type sync.syncable_type
|
|
json.id sync.syncable_id
|
|
json.name syncable&.try(:name)
|
|
end
|
|
json.parent_id sync.parent_id
|
|
json.children_count sync.children.size
|
|
json.window_start_date sync.window_start_date
|
|
json.window_end_date sync.window_end_date
|
|
json.pending_at sync.pending_at
|
|
json.syncing_at sync.syncing_at
|
|
json.completed_at sync.completed_at
|
|
json.failed_at sync.failed_at
|
|
json.error sync.api_error_payload
|
|
json.created_at sync.created_at
|
|
json.updated_at sync.updated_at
|