Fix Server URL field to be editable#3256
Fix Server URL field to be editable#3256Aryan1718 wants to merge 5 commits intobluewave-labs:developfrom
Conversation
ajhollid
left a comment
There was a problem hiding this comment.
Thanks for your contribution thusfar!
A couple of changes needed on the frontend, noted in review.
There is a bigger issue on the server side, which isn't caused by your PR but will require changes to your PR once resolved, so we may as well do it all here.
await editMonitorBodyValidation.validateAsync(req.body);
const editedMonitor = await this.monitorService.editMonitor({ teamId, monitorId, body: req.body });
The body is validated, but then the original unvalidated body is passed to the monitor service.
We should pass the validated body along:
const validatedBody = await editMonitorBodyValidation.validateAsync(req.body);
const editedMonitor = await this.monitorService.editMonitor({ teamId, monitorId, body: validatedBody });
And that will require updating the validation schema to allow the URL field, which is not currently allowed.
The reason the PR works currently is that the body is effectively not validated; if we did validate it properly, it would fail to update the URL as the value would be stripped.
We should be good to go after that 👍
|
Sure, @ajhollid. I will update it accordingly. Thank you. |
|
@Aryan1718 any update? |
|
Sorry about that @Br0wnHammer , I will do it. |
Describe your changes
Fixes inability to edit the "Server URL" field.
Write your issue number after "Fixes "
Fixes #3100
Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.
<div>Add</div>, use):npm run formatin server and client directories, which automatically formats your code.