feat: save single html and update redis

This commit is contained in:
2024-10-27 17:46:59 +08:00
parent c6539439e9
commit e032c092d9
5 changed files with 97 additions and 23 deletions

View File

@@ -66,6 +66,7 @@ app
const newData = { ...app.data, ...data };
const newApp = await app.update({ data: newData, ...rest });
ctx.body = newApp;
setExpire(newApp.id, tokenUser.username);
} else {
throw new CustomError('app not found');
}
@@ -177,7 +178,7 @@ app
const dataFiles = app.data.files || [];
const newFiles = _.uniqBy([...dataFiles, ...files], 'name');
const res = await app.update({ data: { ...app.data, files: newFiles } });
setExpire(app.id, 'test');
ctx.body = prefixFix(res, tokenUser.username);
} catch (e) {
console.log('update error', e);

View File

@@ -5,7 +5,7 @@ import { AppData, AppType, AppStatus } from './app.ts';
export type AppList = Partial<InstanceType<typeof AppListModel>>;
/**
* APP List 管理
* APP List 管理 历史版本管理
*/
export class AppListModel extends Model {
declare id: string;