mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
feat: 升级midway,支持esm
This commit is contained in:
@@ -6,10 +6,10 @@ import {
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { CrudController } from '../../../basic/crud-controller';
|
||||
import { AccessService } from '../service/access-service';
|
||||
import { Constants } from '../../../basic/constants';
|
||||
} from '@midwayjs/core';
|
||||
import { CrudController } from '../../../basic/crud-controller.js';
|
||||
import { AccessService } from '../service/access-service.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
|
||||
/**
|
||||
* 授权
|
||||
|
||||
+4
-11
@@ -1,14 +1,7 @@
|
||||
import {
|
||||
ALL,
|
||||
Controller,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { DnsProviderService } from '../service/dns-provider-service';
|
||||
import { BaseController } from '../../../basic/base-controller';
|
||||
import {Constants} from "../../../basic/constants";
|
||||
import { ALL, Controller, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { DnsProviderService } from '../service/dns-provider-service.js';
|
||||
import { BaseController } from '../../../basic/base-controller.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
import {
|
||||
ALL,
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { CrudController } from '../../../basic/crud-controller';
|
||||
import { PipelineEntity } from '../entity/pipeline';
|
||||
import { HistoryService } from '../service/history-service';
|
||||
import { HistoryLogService } from '../service/history-log-service';
|
||||
import { HistoryEntity } from '../entity/history';
|
||||
import { HistoryLogEntity } from '../entity/history-log';
|
||||
import { Constants } from '../../../basic/constants';
|
||||
import { PipelineService } from '../service/pipeline-service';
|
||||
import { CommonException } from '../../../basic/exception/common-exception';
|
||||
import { PermissionException } from '../../../basic/exception/permission-exception';
|
||||
import { ALL, Body, Controller, Get, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { CrudController } from '../../../basic/crud-controller.js';
|
||||
import { PipelineEntity } from '../entity/pipeline.js';
|
||||
import { HistoryService } from '../service/history-service.js';
|
||||
import { HistoryLogService } from '../service/history-log-service.js';
|
||||
import { HistoryEntity } from '../entity/history.js';
|
||||
import { HistoryLogEntity } from '../entity/history-log.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
import { PipelineService } from '../service/pipeline-service.js';
|
||||
import { CommonException } from '../../../basic/exception/common-exception.js';
|
||||
import { PermissionException } from '../../../basic/exception/permission-exception.js';
|
||||
import * as fs from 'fs';
|
||||
import { logger } from '../../../utils/logger';
|
||||
import { logger } from '../../../utils/logger.js';
|
||||
|
||||
/**
|
||||
* 证书
|
||||
@@ -53,11 +44,7 @@ export class HistoryController extends CrudController<HistoryService> {
|
||||
const buildQuery = qb => {
|
||||
qb.limit(10);
|
||||
};
|
||||
const listRet = await this.getService().list(
|
||||
body,
|
||||
{ prop: 'id', asc: false },
|
||||
buildQuery
|
||||
);
|
||||
const listRet = await this.getService().list(body, { prop: 'id', asc: false }, buildQuery);
|
||||
return this.ok(listRet);
|
||||
}
|
||||
|
||||
@@ -137,11 +124,7 @@ export class HistoryController extends CrudController<HistoryService> {
|
||||
}
|
||||
|
||||
@Get('/download', { summary: Constants.per.authOnly })
|
||||
async download(
|
||||
@Query('pipelineId') pipelineId,
|
||||
@Query('historyId') historyId,
|
||||
@Query('fileId') fileId
|
||||
) {
|
||||
async download(@Query('pipelineId') pipelineId, @Query('historyId') historyId, @Query('fileId') fileId) {
|
||||
const files = await this.getFiles(historyId, pipelineId);
|
||||
const file = files.find(f => f.id === fileId);
|
||||
if (file == null) {
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
import {
|
||||
ALL,
|
||||
Body,
|
||||
Controller,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { CrudController } from '../../../basic/crud-controller';
|
||||
import { PipelineService } from '../service/pipeline-service';
|
||||
import { PipelineEntity } from '../entity/pipeline';
|
||||
import { Constants } from '../../../basic/constants';
|
||||
import { HistoryService } from '../service/history-service';
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { CrudController } from '../../../basic/crud-controller.js';
|
||||
import { PipelineService } from '../service/pipeline-service.js';
|
||||
import { PipelineEntity } from '../entity/pipeline.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
import { HistoryService } from '../service/history-service.js';
|
||||
|
||||
/**
|
||||
* 证书
|
||||
|
||||
@@ -5,10 +5,10 @@ import {
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { BaseController } from '../../../basic/base-controller';
|
||||
import { PluginService } from '../service/plugin-service';
|
||||
import { Constants } from '../../../basic/constants';
|
||||
} from '@midwayjs/core';
|
||||
import { BaseController } from '../../../basic/base-controller.js';
|
||||
import { PluginService } from '../service/plugin-service.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
|
||||
Reference in New Issue
Block a user