web_ppt_7.7 / frontend /public /test-share.html
CatPtain's picture
Upload 46 files
384fef6 verified
<!DOCTYPE html>
<html>
<head>
<title>Test Share Link Generation</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body>
<h1>Test Share Link Generation</h1>
<button onclick="testShareLink()">Generate Share Link</button>
<div id="result"></div>
<script>
async function testShareLink() {
const resultDiv = document.getElementById('result');
resultDiv.innerHTML = 'Testing...';
try {
const response = await axios.post('/api/public/generate-share-link', {
userId: 'user_1735716399333',
pptId: 'ppt_1735716399333',
slideIndex: 0
});
resultDiv.innerHTML = `
<h3>Success!</h3>
<pre>${JSON.stringify(response.data, null, 2)}</pre>
`;
} catch (error) {
resultDiv.innerHTML = `
<h3>Error!</h3>
<p>Status: ${error.response?.status}</p>
<p>Message: ${error.message}</p>
<pre>${JSON.stringify(error.response?.data, null, 2)}</pre>
`;
}
}
</script>
</body>
</html>