refactor(backend): use @hedgedoc/commons DTOs

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2025-03-22 00:38:15 +01:00
parent 7285c2bc50
commit b11dbd51c8
94 changed files with 514 additions and 1642 deletions

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
* SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -8,21 +8,18 @@
@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/no-unsafe-member-access
*/
import { LoginDto, RegisterDto, UpdatePasswordDto } from '@hedgedoc/commons';
import request from 'supertest';
import { LoginDto } from '../../src/auth/local/login.dto';
import { RegisterDto } from '../../src/auth/local/register.dto';
import { UpdatePasswordDto } from '../../src/auth/local/update-password.dto';
import { NotInDBError } from '../../src/errors/errors';
import { UserRelationEnum } from '../../src/users/user-relation.enum';
import { checkPassword } from '../../src/utils/password';
import { Username } from '../../src/utils/username';
import { TestSetup, TestSetupBuilder } from '../test-setup';
describe('Auth', () => {
let testSetup: TestSetup;
let username: Username;
let username: string;
let displayName: string;
let password: string;
@ -75,6 +72,8 @@ describe('Auth', () => {
const conflictingUser = await testSetup.userService.createUser(
conflictingUserName,
displayName,
null,
null,
);
const registrationDto: RegisterDto = {
displayName: displayName,