Skip to content

Reduce scheduler platform mapping conflicts and align posting with mock social API - #9

Open
Jakedoes1111 wants to merge 1 commit into
mainfrom
codex/decide-on-api-implementation-and-make-updates-cskjv2
Open

Reduce scheduler platform mapping conflicts and align posting with mock social API#9
Jakedoes1111 wants to merge 1 commit into
mainfrom
codex/decide-on-api-implementation-and-make-updates-cskjv2

Conversation

@Jakedoes1111

Copy link
Copy Markdown
Owner

Motivation

  • Avoid merge conflicts by keeping the platforms array shape unchanged and moving API naming to a small mapping helper.
  • Ensure the scheduler does not rely on stale connectedAccounts state when deciding whether to post.
  • Standardize scheduler publishing through the local mock social API and make JSON POSTs explicit for compatibility.
  • Fix an incorrect LinkedIn lifecycle state returned by OAuth posting helpers.

Description

  • Added platformApiNameMap and getApiPlatformName and kept the platforms array unchanged in components/ContentScheduler.tsx to reduce merge conflicts.
  • Added fetchConnectedAccounts() and switched the scheduler to fetch latest accounts and post to the mock endpoint at ${socialApiBase}/publish using Content-Type: application/json.
  • Replaced previous oauthService connectivity checks in the scheduler with checks against the freshly fetched accounts and mapping via getApiPlatformName.
  • Ensured JSON POSTs in services/oauthService.ts include the Content-Type: application/json header and corrected LinkedIn lifecycleState to 'PUBLISHED'.

Testing

  • No automated tests were run for these changes.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant