mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
环境变量支持搜索
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ export default (app: Router) => {
|
||||
const logger: Logger = Container.get('logger');
|
||||
try {
|
||||
const envService = Container.get(EnvService);
|
||||
const data = await envService.envs('', { position: -1 });
|
||||
const data = await envService.envs(req.query.searchValue as string);
|
||||
return res.send({ code: 200, data });
|
||||
} catch (e) {
|
||||
logger.error('🔥 error: %o', e);
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class EnvService {
|
||||
}
|
||||
|
||||
public async envs(
|
||||
searchText?: string,
|
||||
searchText: string = '',
|
||||
sort: any = { position: -1 },
|
||||
query: any = {},
|
||||
): Promise<Env[]> {
|
||||
|
||||
Reference in New Issue
Block a user