init
This commit is contained in:
parent
8bac24a9ef
commit
9b05c95972
@ -27,7 +27,7 @@ export const fetchItemsFromAccount = (cookieId: string, page?: number): Promise<
|
||||
|
||||
// 获取账号所有页商品
|
||||
export const fetchAllItemsFromAccount = (cookieId: string): Promise<ApiResponse> => {
|
||||
return post('/items/get-all-from-account', { cookie_id: cookieId })
|
||||
return post('/products/get-all-from-account', { goofish_id: cookieId })
|
||||
}
|
||||
|
||||
// 更新商品
|
||||
|
||||
@ -190,7 +190,7 @@ export default defineConfig(({ command }) => ({
|
||||
bypass: (req) => {
|
||||
// 只有浏览器直接访问 /items 路径时才返回前端页面
|
||||
// API 请求通常是 /items/xxx 或带有 application/json
|
||||
const isApiRequest = req.url !== '/items' ||
|
||||
const isApiRequest = req.url !== '/products' ||
|
||||
req.headers.accept?.includes('application/json') ||
|
||||
req.headers['content-type']?.includes('application/json')
|
||||
if (!isApiRequest && req.headers.accept?.includes('text/html')) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user