diff --git a/src/identity/local/login.dto.ts b/src/identity/local/login.dto.ts new file mode 100644 index 000000000..290c52456 --- /dev/null +++ b/src/identity/local/login.dto.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import { IsString } from 'class-validator'; + +export class LoginDto { + @IsString() + username: string; + @IsString() + password: string; +} diff --git a/src/identity/local/register.dto.ts b/src/identity/local/register.dto.ts new file mode 100644 index 000000000..0c2a9e6c1 --- /dev/null +++ b/src/identity/local/register.dto.ts @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import { IsString } from 'class-validator'; + +export class RegisterDto { + @IsString() + username: string; + + @IsString() + displayname: string; + + @IsString() + password: string; +} diff --git a/src/identity/local/update-password.dto.ts b/src/identity/local/update-password.dto.ts new file mode 100644 index 000000000..bfe473b32 --- /dev/null +++ b/src/identity/local/update-password.dto.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import { IsString } from 'class-validator'; + +export class UpdatePasswordDto { + @IsString() + newPassword: string; +}