Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeak4 committed Feb 12, 2025
1 parent a7883ae commit 9d30015
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
1 change: 0 additions & 1 deletion apps/api/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DATABASE_URL=postgres://dumpovac:dump1234@localhost:3001/ddays-app
RUN_MIGRATIONS_ON_STARTUP=false
NODE_ENV=dev

AAD_TENANT_ID=fdaca06a-158e-4642-b2f3-69ec0adc358b
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `instagram` on the `Speaker` table. All the data in the column will be lost.
- You are about to drop the column `linkedin` on the `Speaker` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Speaker" DROP COLUMN "instagram",
DROP COLUMN "linkedin",
ADD COLUMN "instagramUrl" TEXT,
ADD COLUMN "linkedinUrl" TEXT;
4 changes: 2 additions & 2 deletions apps/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ model Speaker {
companyId Int?
photoUrl String?
photo Json?
instagram String?
linkedin String?
instagramUrl String?
linkedinUrl String?
description String?
company Company? @relation(fields: [companyId], references: [id], onDelete: NoAction, onUpdate: NoAction)
speakerToEvent SpeakerToEvent[]
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/company/company.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class CompanyService {

const createdCompany = await this.prisma.company.create({
data: {
...dto,
...{ ...dto, interestIds: undefined },
password: generatedPassword,
},
});
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/event/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export class EventService {
title: speaker.title,
companyId: speaker.companyId,
photo: speaker.photo,
instagram: speaker.instagram,
linkedin: speaker.linkedin,
instagram: speaker.instagramUrl,
linkedin: speaker.linkedinUrl,
description: speaker.description,
company: speaker.company
? { ...speaker.company, password: undefined }
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/speaker/speaker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SpeakerService {

async create(dto: SpeakerModifyDto): Promise<SpeakerDto> {
if (dto.companyId === 0) {
dto.companyId = null;
dto.companyId = undefined;
}

const createdSpeaker = await this.prisma.speaker.create({
Expand Down

0 comments on commit 9d30015

Please sign in to comment.