This commit is contained in:
eric
2026-03-18 00:53:28 -05:00
parent 4d4ca04167
commit 742c293e14
4 changed files with 153 additions and 20 deletions

View File

@@ -13,16 +13,15 @@ function getSalonApiBase(): string {
return resolvePaymentApiUrl();
}
/** 代理到 salonapi 获取小红书用户资料 */
/** 代理到 salonapi 获取小红书用户资料,支持主页链接、笔记链接 xhslink.com/o/ */
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const url = String(body?.url || "").trim();
const url = String(body?.url || body?.id || "").trim();
if (!url) {
return NextResponse.json({ ok: false, error: "请输入小红书链接" }, { status: 400 });
}
const apiBase = getSalonApiBase();
const res = await fetch(`${apiBase}/api/salon/xiaohongshu/profile`, {
method: "POST",