mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-29 07:47:47 +01:00
do not allow uploading same photo twice
This commit is contained in:
@@ -43,6 +43,7 @@ export interface IPhotoReqJSON extends IPhotoJSON {
|
||||
}
|
||||
|
||||
@Entity()
|
||||
@Index(["hash", "size", "user"], { unique: true })
|
||||
export class Photo extends BaseEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
public id: number;
|
||||
|
||||
Reference in New Issue
Block a user