refactor: metadata entity ()

This commit is contained in:
Jason Rasmussen 2025-04-09 11:45:30 -04:00 committed by GitHub
parent 3e372500b0
commit 206545356d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 120 additions and 148 deletions
server/src/services

View file

@ -1,10 +1,10 @@
import { BadRequestException, ForbiddenException, UnauthorizedException } from '@nestjs/common';
import { DateTime } from 'luxon';
import { AuthDto, SignUpDto } from 'src/dtos/auth.dto';
import { UserMetadataEntity } from 'src/entities/user-metadata.entity';
import { UserEntity } from 'src/entities/user.entity';
import { AuthType, Permission } from 'src/enum';
import { AuthService } from 'src/services/auth.service';
import { UserMetadataItem } from 'src/types';
import { sharedLinkStub } from 'test/fixtures/shared-link.stub';
import { systemConfigStub } from 'test/fixtures/system-config.stub';
import { userStub } from 'test/fixtures/user.stub';
@ -230,7 +230,7 @@ describe('AuthService', () => {
...dto,
id: 'admin',
createdAt: new Date('2021-01-01'),
metadata: [] as UserMetadataEntity[],
metadata: [] as UserMetadataItem[],
} as UserEntity);
await expect(sut.adminSignUp(dto)).resolves.toMatchObject({