-
Notifications
You must be signed in to change notification settings - Fork 317
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
Refactor Resource Form: Create new broadcast upon successful resource form submission #1031
Refactor Resource Form: Create new broadcast upon successful resource form submission #1031
Conversation
@Kajol-Kumari Please review and let me know if any changes are required. |
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.
trustLevel: Joi.number().integer().required(), | ||
expiryDate: Joi.date().required(), | ||
additionalInfo: Joi.string().trim().min(5), | ||
// const ResourcesValidationSchema = Joi.object().keys({ |
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.
please remove the commented code as it won't be needed anymore
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.
okay, also, we don't need resource model as we are using brodcast model and previous backend code addresource, get resource , deleteResource: should i remove it or skip that?
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.
Please remove it as it will just redundant code after this change
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.
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.
yeah, that should be fine
@Kajol-Kumari i configured .env and tested in my local |
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.
LGTM
@shivamgaur99 one thing i forgot, where is the |
@shivamgaur99 please make sure to introduce the |
@shivamgaur99 please let me know when the pr becomes ready for review(isApproved flag is yet missing) |
i will make pr by morning after testing everything is working as expected |
Please review, all changes have been made :) |
} = require('./utility/emailTemplates'); | ||
const Admin = require('./app/models/Admin'); | ||
|
||
// Cron job to delete all resource data for 2months | ||
cronJob('0 0 2 * *', async (req, res, next) => { |
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.
we might need the cron job later to delete the broadcast/contactUs data which are older than 6 months/1 year as they will just keep on accumulating no?, for now it should be fine
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.
Since there was no cron job for the broadcast, I didn't add it. Can I add it to the current PR?
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.
If i think in long term, the broadcast and contactUs data will grow na but admin have delete functionality so should
Be fine o believe, skip it for now, i will add it later if required
Closes: #1021
##Description
Refactor the resource form so that a new broadcast gets created on successful submission
Screenshots
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that applyOther information
Any other information that is important to this pull request