Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit campaing application task(Admin and Organaizer) #660

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

Martbul
Copy link
Contributor

@Martbul Martbul commented Jul 25, 2024

No description provided.

Copy link

github-actions bot commented Jul 25, 2024

✅ Tests will run for this PR. Once they succeed it can be merged.

const person = await this.personService.findOneByKeycloakId(user.sub)
if (!person) throw new NotFoundException('User is not found')

let isAdminFlag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this defined before the ifs since you are not using it after that.
Try to define variables in the scope they are used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using person.id

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to the isAdminFlag, but it is not a big deal.

organaizerId?: string,
files?: Express.Multer.File[],
) {
console.log(id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove please

personId: string,
updateCampaignApplicationDto: UpdateCampaignApplicationDto,
isAdminFlag: boolean,
organaizerId?: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: organizerId

Comment on lines 174 to 177
for (const file of existingCampaignApplicationFiles) {
await this.s3.deleteObject(this.bucketName, file.id)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we delete the previous files?
I'd say the default is that we incrementally add new files.
If the user wants to delete a file - they should do so explicitly one by one.

@@ -1,7 +1,7 @@
import { Person } from '@prisma/client'

export const personMock: Person = {
id: 'e43348aa-be33-4c12-80bf-2adfbf8736cd',
id: 'personId',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@Martbul Martbul requested a review from slavcho July 26, 2024 09:39
add new endpoint for uploading files to campaignApplication
remove upload functionality on create and on update campaignApplication
const person = await this.personService.findOneByKeycloakId(user.sub)
if (!person) throw new NotFoundException('User is not found')

let isAdminFlag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to the isAdminFlag, but it is not a big deal.

@slavcho slavcho added the run tests Allows running the tests workflows for forked repos label Aug 7, 2024
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Aug 7, 2024
@slavcho slavcho merged commit 2e68561 into podkrepi-bg:master Aug 7, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants