fix: assign trusted and ip in userdata for search api

This commit is contained in:
Viren070
2025-08-31 14:19:04 +01:00
parent 735bba5e33
commit 78c94dfec3
+2
View File
@@ -60,6 +60,7 @@ router.get(
Buffer.from(encodedUserData, 'base64').toString('utf-8')
);
if (userData) {
userData.trusted = false;
logger.debug(`Using encodedUserData for Search API request`);
}
} catch (error: any) {
@@ -123,6 +124,7 @@ router.get(
if (!userData) {
throw new APIError(constants.ErrorCode.USER_INVALID_DETAILS);
}
userData.ip = req.userIp;
try {
userData = await validateConfig(userData, true, true);
} catch (error: any) {