feat: add chat message
This commit is contained in:
27
src/scripts/recover.ts
Normal file
27
src/scripts/recover.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ContainerModel } from '@/routes/container/models/index.ts';
|
||||
|
||||
const recoverData = async () => {
|
||||
const data = {
|
||||
id: '868970a4-8cab-4141-a73c-cc185fd17508',
|
||||
title: '测试es6每次导入的变量,运行一次+1,并打印',
|
||||
description: '',
|
||||
tags: [],
|
||||
type: '',
|
||||
code: "let a = 1\n\nexport const main = () => {\n console.log('current a', a);\n return a++\n}",
|
||||
source: '',
|
||||
sourceType: '',
|
||||
data: {
|
||||
className: '',
|
||||
style: {},
|
||||
showChild: true,
|
||||
shadowRoot: false,
|
||||
},
|
||||
publish: {},
|
||||
uid: '14206305-8b5c-44cc-b177-766cfe2e452f',
|
||||
createdAt: '2024-09-19T13:27:58.796Z',
|
||||
updatedAt: '2024-09-28T05:27:05.381Z',
|
||||
};
|
||||
const r = await ContainerModel.create(data);
|
||||
};
|
||||
|
||||
recoverData();
|
||||
Reference in New Issue
Block a user