mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
Set TypeScript to strict mode and fix issues related to server types (#261)
* Fix lint issues and some other TS issues - set TypeScript in strict mode - add npm commands to lint / check code - fix all lint issues - fix some TS issues - rename User reponse DTO to make it consistent with the other ones - override Express/User interface to use UserResponseDto interface This is for when the accessing the `user` from a Express Request, like in `asset-upload-config` * Fix the rest of TS issues - fix all the remaining TypeScript errors - add missing `@types/mapbox__mapbox-sdk` package * Move global.d.ts to server `src` folder * Update AssetReponseDto duration type This is now of type `string` that defaults to '0:00:00.00000' if not set which is what the mobile app currently expects * Set context when logging error in asset.service Use `ServeFile` as the context for logging an error when asset.resizePath is not set * Fix wrong AppController merge conflict resolution `redirectToWebpage` was removed in main as is no longer used.
This commit is contained in:
@@ -6,22 +6,22 @@ import { AlbumEntity } from './album.entity';
|
||||
@Unique('PK_unique_user_in_album', ['albumId', 'sharedUserId'])
|
||||
export class UserAlbumEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: string;
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
albumId: string;
|
||||
albumId!: string;
|
||||
|
||||
@Column()
|
||||
sharedUserId: string;
|
||||
sharedUserId!: string;
|
||||
|
||||
@ManyToOne(() => AlbumEntity, (album) => album.sharedUsers, {
|
||||
onDelete: 'CASCADE',
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn({ name: 'albumId' })
|
||||
albumInfo: AlbumEntity;
|
||||
albumInfo!: AlbumEntity;
|
||||
|
||||
@ManyToOne(() => UserEntity)
|
||||
@JoinColumn({ name: 'sharedUserId' })
|
||||
userInfo: UserEntity;
|
||||
userInfo!: UserEntity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user