mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-09-19 01:35:47 +08:00
fix: class validator decorator usages (#6293)
* fix: class validator decorator usages * fix: feedback
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsEmail, IsNotEmpty } from 'class-validator';
|
||||
import { IsEmail } from 'class-validator';
|
||||
|
||||
// Inputs to initiate Magic-Link auth flow
|
||||
export class SignInMagicDto {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Field, InputType } from '@nestjs/graphql';
|
||||
import { InfraConfigEnum } from 'src/types/InfraConfig';
|
||||
import { ServiceStatus } from './helper';
|
||||
import { AuthProvider } from 'src/auth/helper';
|
||||
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { IsEnum, IsString } from 'class-validator';
|
||||
|
||||
@InputType()
|
||||
export class InfraConfigArgs {
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsEmail,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
MinLength,
|
||||
|
||||
@@ -67,7 +67,6 @@ export class CreatePublishedDocsArgs {
|
||||
workspaceType: WorkspaceType;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@Field({
|
||||
name: 'workspaceID',
|
||||
description: 'ID of the workspace',
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
PUBLISHED_DOCS_CREATION_FAILED,
|
||||
PUBLISHED_DOCS_DELETION_FAILED,
|
||||
PUBLISHED_DOCS_INVALID_COLLECTION,
|
||||
PUBLISHED_DOCS_FORBIDDEN_ENVIRONMENT_ACCESS,
|
||||
PUBLISHED_DOCS_NOT_FOUND,
|
||||
PUBLISHED_DOCS_UPDATE_FAILED,
|
||||
TEAM_ENVIRONMENT_NOT_FOUND,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ArgsType, Field, ID, InputType } from '@nestjs/graphql';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from 'class-validator';
|
||||
import { IsInt, IsOptional, IsString, Min } from 'class-validator';
|
||||
|
||||
@ArgsType()
|
||||
@InputType()
|
||||
|
||||
@@ -67,7 +67,8 @@ export class CreateUserRequestArgs {
|
||||
@IsNotEmpty()
|
||||
request: string;
|
||||
|
||||
type: ReqType;
|
||||
@IsOptional()
|
||||
type?: ReqType;
|
||||
}
|
||||
|
||||
@ArgsType()
|
||||
|
||||
Reference in New Issue
Block a user