feat: add admin tests read and update endpoints
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
@Index(['phone', 'used'])
|
||||
export class OTP {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
id!: number;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
@@ -19,23 +19,23 @@ export class OTP {
|
||||
length: 11,
|
||||
nullable: false,
|
||||
})
|
||||
phone: string;
|
||||
phone!: string;
|
||||
|
||||
@Column({
|
||||
type: 'varchar',
|
||||
nullable: false,
|
||||
})
|
||||
code: string;
|
||||
code!: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
createdAt!: Date;
|
||||
|
||||
@Index()
|
||||
@Column({ type: 'timestamptz' })
|
||||
expiresAt: Date;
|
||||
expiresAt!: Date;
|
||||
|
||||
@Column({ type: 'boolean', default: false })
|
||||
used: boolean;
|
||||
used!: boolean;
|
||||
|
||||
@BeforeInsert()
|
||||
setExpiry() {
|
||||
|
||||
Reference in New Issue
Block a user