feat: 下载page到本地
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ContainerModel } from '@/routes/container/models/index.ts';
|
||||
|
||||
import { ChatPrompt } from '@/models/chat-prompt.ts';
|
||||
const recoverData = async () => {
|
||||
const data = {
|
||||
id: '868970a4-8cab-4141-a73c-cc185fd17508',
|
||||
@@ -24,4 +24,24 @@ const recoverData = async () => {
|
||||
const r = await ContainerModel.create(data);
|
||||
};
|
||||
|
||||
recoverData();
|
||||
// recoverData();
|
||||
|
||||
const revoverId = async () => {
|
||||
const id = 'e235576e-eb48-4b5c-8385-9b8ada4a137f';
|
||||
// const cp = await ChatPrompt.findByPk(id);
|
||||
const cp = await ChatPrompt.findAll({
|
||||
paranoid: false,
|
||||
});
|
||||
console.log(
|
||||
cp.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
// @ts-ignore
|
||||
deletedAt: item.deletedAt,
|
||||
};
|
||||
}),
|
||||
);
|
||||
// cp 被删除了,复原
|
||||
await ChatPrompt.restore({ where: { id } });
|
||||
};
|
||||
revoverId();
|
||||
|
||||
Reference in New Issue
Block a user