Upload ppt.js
Browse files
backend/src/routes/ppt.js
CHANGED
@@ -77,7 +77,7 @@ router.get('/:pptId', async (req, res, next) => {
|
|
77 |
router.post('/save', async (req, res, next) => {
|
78 |
try {
|
79 |
const userId = req.user.userId;
|
80 |
-
const { pptId, title, slides, theme } = req.body;
|
81 |
|
82 |
if (!pptId || !slides) {
|
83 |
return res.status(400).json({ error: 'PPT ID and slides are required' });
|
@@ -89,6 +89,9 @@ router.post('/save', async (req, res, next) => {
|
|
89 |
title: title || '未命名演示文稿',
|
90 |
slides: slides,
|
91 |
theme: theme || {},
|
|
|
|
|
|
|
92 |
createdAt: new Date().toISOString(),
|
93 |
updatedAt: new Date().toISOString()
|
94 |
};
|
|
|
77 |
router.post('/save', async (req, res, next) => {
|
78 |
try {
|
79 |
const userId = req.user.userId;
|
80 |
+
const { pptId, title, slides, theme, viewportSize, viewportRatio } = req.body;
|
81 |
|
82 |
if (!pptId || !slides) {
|
83 |
return res.status(400).json({ error: 'PPT ID and slides are required' });
|
|
|
89 |
title: title || '未命名演示文稿',
|
90 |
slides: slides,
|
91 |
theme: theme || {},
|
92 |
+
// 保存关键的尺寸信息
|
93 |
+
viewportSize: viewportSize,
|
94 |
+
viewportRatio: viewportRatio,
|
95 |
createdAt: new Date().toISOString(),
|
96 |
updatedAt: new Date().toISOString()
|
97 |
};
|