Fix AI comment rate limit regression
This commit is contained in:
@@ -1318,6 +1318,11 @@ function checkAIAutoCommentActionAvailability(profileNumber, settings = getAIAut
|
|||||||
status: currentStatus
|
status: currentStatus
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
ok: true,
|
||||||
|
status: currentStatus
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return check();
|
return check();
|
||||||
@@ -7910,10 +7915,11 @@ app.post('/api/ai/generate-comment', async (req, res) => {
|
|||||||
return res.status(statusCode).json(payload);
|
return res.status(statusCode).json(payload);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let autoCommentRateLimitStatus = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { postText, profileNumber, preferredCredentialId } = requestBody;
|
const { postText, profileNumber, preferredCredentialId } = requestBody;
|
||||||
const normalizedProfileNumber = sanitizeProfileNumber(profileNumber);
|
const normalizedProfileNumber = sanitizeProfileNumber(profileNumber);
|
||||||
let autoCommentRateLimitStatus = null;
|
|
||||||
|
|
||||||
if (!postText) {
|
if (!postText) {
|
||||||
return respondWithTrackedError(400, 'postText is required');
|
return respondWithTrackedError(400, 'postText is required');
|
||||||
|
|||||||
Reference in New Issue
Block a user