Fix lint errors

This commit is contained in:
Tuan Dang
2023-07-26 15:06:18 +07:00
parent cf77820059
commit bf08bfacb5
18 changed files with 41 additions and 28 deletions
@@ -1,5 +1,5 @@
import { Request, Response } from "express";
import { PipelineStage, trusted, Types } from "mongoose";
import { PipelineStage, Types } from "mongoose";
import { Secret } from "../../../models";
import {
FolderVersion,
@@ -15,7 +15,7 @@ import { getLatestSecretVersionIds } from "../../helpers/secretVersion";
import Folder, { TFolderSchema } from "../../../models/folder";
import { searchByFolderId } from "../../../services/FolderService";
import { EELicenseService } from "../../services";
import { isValidIpOrCidr, extractIPDetails } from "../../../utils/ip";
import { extractIPDetails, isValidIpOrCidr } from "../../../utils/ip";
/**
* Return secret snapshots for workspace with id [workspaceId]
+1 -1
View File
@@ -3,7 +3,7 @@ const router = express.Router();
import {
requireAuth
} from "../../../middleware";
import { AUTH_MODE_JWT, AUTH_MODE_API_KEY } from "../../../variables";
import { AUTH_MODE_API_KEY, AUTH_MODE_JWT } from "../../../variables";
import { usersController } from "../../controllers/v1";
router.get(
+1 -1
View File
@@ -88,7 +88,7 @@ export const isValidCidr = (cidr: string): boolean => {
*/
export const isValidIpOrCidr = (ip: string): boolean => {
// if the string contains a slash, treat it as a CIDR block
if (ip.includes('/')) {
if (ip.includes("/")) {
return isValidCidr(ip);
}
+3 -3
View File
@@ -4,11 +4,11 @@ import { Types } from "mongoose";
import { encryptSymmetric128BitHexKeyUTF8 } from "../crypto";
import { EESecretService } from "../../ee/services";
import {
IPType,
ISecretVersion,
SecretSnapshot,
SecretSnapshot,
SecretVersion,
TrustedIP,
IPType
TrustedIP
} from "../../ee/models";
import {
BackupPrivateKey,