REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 992 B
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/HelpCenter/lib/api.js
Text
Base64
import { AI_HOST } from '@constants'; import { useAIConsentStore } from '@shared/state/ai-consent'; // Additional data to send with requests const allowList = [ 'siteId', 'partnerId', 'wpVersion', 'wpLanguage', 'devbuild', 'isBlockTheme', 'userId', 'siteProfile', ]; const { showAIConsent, userGaveConsent } = useAIConsentStore.getState(); const extraBody = { ...Object.fromEntries( Object.entries(window.extSharedData).filter(([key]) => allowList.includes(key), ), ), showAIConsent, userGaveConsent, }; export const getAnswer = ({ question, experienceLevel }) => fetch(`${AI_HOST}/api/chat/ask-question`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ question, experienceLevel, ...extraBody }), }); export const rateAnswer = ({ answerId, rating }) => fetch(`${AI_HOST}/api/chat/rate-answer`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ answerId, rating }), });
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
api.js
992 B
lrw-r--r--
2025-02-14 00:15:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tour-helpers.js
461 B
lrw-r--r--
2024-03-14 20:40:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
79 B
lrw-r--r--
2025-08-27 17:47:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).