fix: move share quota block to download and add 3s download alert
This commit is contained in:
@@ -5661,9 +5661,9 @@ app.post('/api/share/:code/list', shareRateLimitMiddleware, async (req, res) =>
|
||||
shareLimiter.recordSuccess(req.shareRateLimitKey);
|
||||
}
|
||||
|
||||
// 获取分享者的用户信息
|
||||
const ownerPolicyState = enforceDownloadTrafficPolicy(share.user_id, 'share_download_url');
|
||||
const shareOwner = ownerPolicyState?.user || UserDB.findById(share.user_id);
|
||||
// 获取分享者的用户信息(查看列表不触发下载流量策略)
|
||||
// 仅在实际下载接口中校验和消耗下载流量,避免“可见性”受配额影响
|
||||
const shareOwner = UserDB.findById(share.user_id);
|
||||
if (!shareOwner) {
|
||||
return res.status(404).json({
|
||||
success: false,
|
||||
|
||||
Reference in New Issue
Block a user