feat: add get domainApp api
This commit is contained in:
parent
0fc580aa38
commit
3c7ef0d6e4
@ -216,3 +216,21 @@ app
|
|||||||
ctx.body = app;
|
ctx.body = app;
|
||||||
})
|
})
|
||||||
.addTo(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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user