mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 06:23:11 +08:00
Fixed bug with custom css not persisting
This commit is contained in:
@@ -4,6 +4,7 @@ const Config = require('../models/Config');
|
||||
const { Op } = require('sequelize');
|
||||
const File = require('../utils/File');
|
||||
const { join } = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// @desc Insert new key:value pair
|
||||
// @route POST /api/config
|
||||
@@ -151,6 +152,9 @@ exports.updateCss = asyncWrapper(async (req, res, next) => {
|
||||
const file = new File(join(__dirname, '../public/flame.css'));
|
||||
file.write(req.body.styles);
|
||||
|
||||
// Copy file to docker volume
|
||||
fs.copyFileSync(join(__dirname, '../public/flame.css'), join(__dirname, '../data/flame.css'));
|
||||
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
data: {}
|
||||
|
||||
Reference in New Issue
Block a user