-
Notifications
You must be signed in to change notification settings - Fork 48
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
Edit campaing application task(Admin and Organaizer) #660
Conversation
✅ 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using person.id
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: organizerId
for (const file of existingCampaignApplicationFiles) { | ||
await this.s3.deleteObject(this.bucketName, file.id) | ||
} | ||
|
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
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 |
There was a problem hiding this comment.
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.
No description provided.