diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bd49a7c..26c22c3 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1038,13 +1038,13 @@ model ActivityOtherDetails { id Int @id @default(autoincrement()) activityXid Int @map("activity_xid") activity Activities @relation(fields: [activityXid], references: [id], onDelete: Cascade) - exclusiveNotes String? @map("exclusive_notes") @db.VarChar(500) - SafetyInstruction String? @map("safety_instruction") @db.VarChar(400) - Cancellations String? @map("cancellations") @db.VarChar(400) - dosNotes String? @map("dos_notes") @db.VarChar(400) - dontsNotes String? @map("donts_notes") @db.VarChar(400) - tipsNotes String? @map("tips_notes") @db.VarChar(400) - termsAndCondition String? @map("terms_and_condition") @db.VarChar(500) + exclusiveNotes String? @map("exclusive_notes") @db.Text + SafetyInstruction String? @map("safety_instruction") @db.Text + Cancellations String? @map("cancellations") @db.Text + dosNotes String? @map("dos_notes") @db.Text + dontsNotes String? @map("donts_notes") @db.Text + tipsNotes String? @map("tips_notes") @db.Text + termsAndCondition String? @map("terms_and_condition") @db.Text isActive Boolean @default(true) @map("is_active") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") diff --git a/src/modules/host/services/token.service.ts b/src/modules/host/services/token.service.ts index 403744b..29642ca 100644 --- a/src/modules/host/services/token.service.ts +++ b/src/modules/host/services/token.service.ts @@ -53,10 +53,10 @@ export class TokenService { config.jwt.secret ); - await this.prisma.token.deleteMany({ - where: { userXid: user_xid } - }) - + // Optionally keep existing refresh tokens alive instead of deleting + // Removed deleteMany call so the same refresh token can be used multiple + // times. If you want to limit refresh tokens later you can implement + // rotation or blacklist logic elsewhere. await this.prisma.token.create({ data: { token: refreshToken.token,