mirror of
https://github.com/run-llama/crossposter.git
synced 2026-07-15 05:45:36 -04:00
[PR #2] [MERGED] Adds fixes to auth and post routes to allow for posting without media #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/crossposter/pull/2
Author: @catcarbonell
Created: 2/17/2025
Status: ✅ Merged
Merged: 3/12/2025
Merged by: @seldo
Base:
main← Head:features/allows-text-post📝 Commits (1)
d18f34cAdds fixes to auth and post routes to allow for posting without media📊 Changes
7 files changed (+221 additions, -88 deletions)
View changed files
📝
frontend/.gitignore(+2 -0)📝
frontend/next.config.ts(+13 -0)📝
frontend/package-lock.json(+89 -68)📝
frontend/package.json(+3 -2)📝
frontend/src/app/api/auth/[...nextauth]/route.ts(+1 -1)📝
frontend/src/app/api/post/route.ts(+40 -17)📝
frontend/src/util/linkedinPostShare.ts(+73 -0)📄 Description
Hey there! I was only able to test up to a point until I found out one had to pay to use Anthropic's API. I tested out my potential fixes by creating mock clients and they went through. I hope this one works on your side with full-access to the APIs.
api/post/route.ts
L78 -- Addresses a potential fix for Twitter; checks for media, if none, media === "undefined"
L98-L101 -- Commented out potential blocker for posting text-only posts.
L108-L115 -- Created two more results - one for an Organization, and one for an individual
L152-L155 -- Instead of throwing an error, it allows to post with just text, leaving media as "null"
util/linkedinPostShare.ts
L297-L368 -- Adds methods for posting without media for an Org and individuals
Let me know if there's anything else I can do to help!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.