-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Restrict organization update to admin only - Add a max length to the name field
- Loading branch information
Blessing Makaraba
authored and
Blessing Makaraba
committed
Jan 31, 2023
1 parent
af388db
commit b9370b6
Showing
2 changed files
with
3 additions
and
1 deletion.
There are no files selected for viewing
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
3 changes: 2 additions & 1 deletion
3
apps/api/src/app/organization/usecases/update-organization/update-organization-command.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,10 @@ | ||
import { IsDefined } from 'class-validator'; | ||
import { IsDefined, MaxLength } from 'class-validator'; | ||
import { AuthenticatedCommand } from '../../../shared/commands/authenticated.command'; | ||
|
||
export class UpdateOrganizationCommand extends AuthenticatedCommand { | ||
@IsDefined() | ||
public readonly id: string; | ||
|
||
@MaxLength(50) | ||
name: string; | ||
} |