fix issue with spoiler tags being sent

This commit is contained in:
juni
2024-10-25 15:42:59 -04:00
parent b081b71e7d
commit 276d3b0663
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ export const getPost: Handler<
Env,
'/profile/:user/post/:post' | '/https://bsky.app/profile/:user/post/:post'
> = async (c) => {
const { user, post } = c.req.param();
let { user, post } = c.req.param();
post = post.replaceAll('|', '');
const isDirect = c.req.query('direct');
const agent = c.get('Agent');

View File

@@ -7,7 +7,8 @@ export const getProfile: Handler<
Env,
'/profile/:user' | '/https://bsky.app/profile/:user'
> = async (c) => {
const { user } = c.req.param();
let { user } = c.req.param();
user = user.replaceAll('|', '');
const agent = c.get('Agent');
try {
var { data } = await fetchProfile(agent, { user });