-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
N21-2309 Fix validation and add support for unknown schulconnex group…
… roles (#5367)
- Loading branch information
1 parent
7fff38c
commit fcca17c
Showing
3 changed files
with
8 additions
and
10 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
...erver/src/infra/schulconnex-client/response/schulconnex-gruppenzugehoerigkeit-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { IsArray, IsEnum, IsOptional } from 'class-validator'; | ||
import { SchulconnexGroupRole } from './schulconnex-group-role'; | ||
import { IsArray, IsOptional, IsString } from 'class-validator'; | ||
|
||
export class SchulconnexGruppenzugehoerigkeitResponse { | ||
@IsOptional() | ||
@IsArray() | ||
@IsEnum(SchulconnexGroupRole, { each: true }) | ||
rollen?: SchulconnexGroupRole[]; | ||
@IsString({ each: true }) | ||
rollen?: string[]; | ||
} |
7 changes: 3 additions & 4 deletions
7
...src/infra/schulconnex-client/response/schulconnex-sonstige-gruppenzugehoerige-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { IsArray, IsEnum, IsOptional, IsString } from 'class-validator'; | ||
import { SchulconnexGroupRole } from './schulconnex-group-role'; | ||
import { IsArray, IsOptional, IsString } from 'class-validator'; | ||
|
||
export class SchulconnexSonstigeGruppenzugehoerigeResponse { | ||
@IsString() | ||
ktid!: string; | ||
|
||
@IsOptional() | ||
@IsArray() | ||
@IsEnum(SchulconnexGroupRole, { each: true }) | ||
rollen?: SchulconnexGroupRole[]; | ||
@IsString({ each: true }) | ||
rollen?: string[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters