Fixed the same thing in updateConfigData
Because I forgot I had also done a require for FS
This commit is contained in:
parent
e14f0fede9
commit
d35172aac6
@ -1,9 +1,9 @@
|
||||
import { RequestHandler } from "express";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
const rootDir = path.join(__dirname, "../../..");
|
||||
|
||||
const updateConfigData: RequestHandler = async (req) => {
|
||||
const fs = require('fs');
|
||||
const updateSettingsData = req.body;
|
||||
|
||||
fs.writeFile(path.join(rootDir, "config.json"), updateSettingsData, function(err:any) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user