feat: save single html and update redis
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user