feat: 优化假数据上传逻辑,简化响应处理并添加调试信息
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 1m39s
/ depcheck (push) Successful in 1m36s
/ playwright (push) Successful in 1m59s

This commit is contained in:
严浩
2024-12-16 00:54:28 +08:00
parent 5f0eaa2579
commit 511f07f778
2 changed files with 4 additions and 20 deletions

View File

@ -7,19 +7,11 @@ export default defineFakeRoute([
timeout: 2000,
method: 'POST',
url: '/fake/upload',
/* response: (_, __, res) => {
fail = !fail;
if (fail) {
res.statusCode = 500;
return {
error: 'Upload failed',
};
}
response: () => {
return {
url: 'https://picsum.photos/200/300',
};
}, */
},
rawResponse(req, res) {
fail = !fail;
if (fail) {