mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 11:39:36 +02:00
Fixed bug with custom css not persisting
This commit is contained in:
parent
4143ae8198
commit
88785aaa32
5 changed files with 40 additions and 12 deletions
|
@ -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: {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue