first commit
This commit is contained in:
parent
7031d45909
commit
b8fc82c33f
@ -32,6 +32,8 @@ app.get('/', (req: Request, res: Response) => {
|
|||||||
app.post('/save-view', async (req: Request, res: Response) => {
|
app.post('/save-view', async (req: Request, res: Response) => {
|
||||||
try {
|
try {
|
||||||
const { file, payload } = req.body;
|
const { file, payload } = req.body;
|
||||||
|
console.log(payload);
|
||||||
|
|
||||||
const savePath = path.join(rootPath, file);
|
const savePath = path.join(rootPath, file);
|
||||||
const buffer = BSON.serialize(payload);
|
const buffer = BSON.serialize(payload);
|
||||||
fs.writeFileSync(savePath, buffer);
|
fs.writeFileSync(savePath, buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user