优化客户端请求时候操作的页面不更新
This commit is contained in:
@@ -84,17 +84,17 @@ function logPostgrestQuery(endpoint: string, params?: QueryParams, method: strin
|
||||
}
|
||||
}
|
||||
|
||||
console.log('\n📦 PostgREST 查询日志 ========================');
|
||||
console.log(`📦 HTTP 方法: ${method}`);
|
||||
console.log(`📦 完整 URL: ${decodeUrlForDisplay(fullUrl)}`);
|
||||
// console.log('\n📦 PostgREST 查询日志 ========================');
|
||||
// console.log(`📦 HTTP 方法: ${method}`);
|
||||
// console.log(`📦 完整 URL: ${decodeUrlForDisplay(fullUrl)}`);
|
||||
|
||||
// 打印请求体数据(仅适用于POST/PATCH/PUT请求)
|
||||
if (['POST', 'PATCH', 'PUT'].includes(method) && data) {
|
||||
console.log('📦 请求体数据:');
|
||||
console.log(JSON.stringify(data, null, 2));
|
||||
}
|
||||
// if (['POST', 'PATCH', 'PUT'].includes(method) && data) {
|
||||
// console.log('📦 请求体数据:');
|
||||
// console.log(JSON.stringify(data, null, 2));
|
||||
// }
|
||||
|
||||
console.log('📦 PostgREST 查询日志 ========================\n');
|
||||
// console.log('📦 PostgREST 查询日志 ========================\n');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +467,8 @@ export async function postgrestPut<T, D extends object>(
|
||||
headers: {
|
||||
'Prefer': 'return=representation'
|
||||
}
|
||||
}
|
||||
},
|
||||
queryParams
|
||||
);
|
||||
|
||||
if (response.error) {
|
||||
|
||||
Reference in New Issue
Block a user