mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
chore: 优化站点ip检查
This commit is contained in:
@@ -45,8 +45,10 @@ export class SiteInfoController extends CrudController<SiteIpService> {
|
||||
bean.from = "manual"
|
||||
const res = await this.service.add(bean);
|
||||
const siteEntity = await this.siteInfoService.info(bean.siteId);
|
||||
const {domain, httpsPort} = siteEntity;
|
||||
this.service.check(res.id,domain, httpsPort);
|
||||
if(!siteEntity.disabled){
|
||||
const {domain, httpsPort} = siteEntity;
|
||||
this.service.check(res.id,domain, httpsPort);
|
||||
}
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@@ -56,8 +58,10 @@ export class SiteInfoController extends CrudController<SiteIpService> {
|
||||
delete bean.userId;
|
||||
await this.service.update(bean);
|
||||
const siteEntity = await this.siteInfoService.info(bean.siteId);
|
||||
const {domain, httpsPort} = siteEntity;
|
||||
this.service.check(bean.id,domain, httpsPort);
|
||||
if(!siteEntity.disabled){
|
||||
const {domain, httpsPort} = siteEntity;
|
||||
this.service.check(siteEntity.id,domain, httpsPort);
|
||||
}
|
||||
return this.ok();
|
||||
}
|
||||
@Post('/info', { summary: Constants.per.authOnly })
|
||||
|
||||
Reference in New Issue
Block a user