feat: merge V1.3 CMS content support
This commit is contained in:
@@ -149,8 +149,8 @@ app.get('/api/cms/config', (req, res) => {
|
||||
});
|
||||
app.put('/api/cms/config', (req, res) => {
|
||||
const f = req.body;
|
||||
db.run(`UPDATE global_config SET site_title=?, slogan=?, seo_title=?, seo_desc=?, seo_keywords=?, hotline=?, contact_email=?, contact_address=?, cta_text=?, cta_link=?, updated_at=? WHERE id=1`,
|
||||
[f.site_title, f.slogan, f.seo_title, f.seo_desc, f.seo_keywords, f.hotline, f.contact_email, f.contact_address, f.cta_text, f.cta_link, nowISO()], function(err){
|
||||
db.run(`UPDATE global_config SET site_title=?, slogan=?, seo_title=?, seo_desc=?, seo_keywords=?, hotline=?, contact_email=?, contact_address=?, cta_text=?, cta_link=?, qr_image_url=?, qr_target_url=?, qr_label=?, updated_at=? WHERE id=1`,
|
||||
[f.site_title, f.slogan, f.seo_title, f.seo_desc, f.seo_keywords, f.hotline, f.contact_email, f.contact_address, f.cta_text, f.cta_link, f.qr_image_url, f.qr_target_url, f.qr_label, nowISO()], function(err){
|
||||
if(err) return res.status(500).json({code:500, msg: err.message});
|
||||
res.json({code:0, msg:'保存成功'});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user