diff --git a/src/routes/app-manager/list.ts b/src/routes/app-manager/list.ts index ced514f..7cacafd 100644 --- a/src/routes/app-manager/list.ts +++ b/src/routes/app-manager/list.ts @@ -216,3 +216,21 @@ app ctx.body = app; }) .addTo(app); + +app + .route({ + path: 'app', + key: 'getDomainApp', + }) + .define(async (ctx) => { + const { domain } = ctx.query.data; + // const query = { + // } + const app = await AppModel.findOne({ where: { domain } }); + if (!app) { + throw new CustomError('app not found'); + } + ctx.body = app; + return ctx; + }) + .addTo(app);