-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feat: integrate domain delete + renew with DB + tooltips #276
Conversation
- Adds integration of deleting domain - Add integration of renewing domain (expiry date + 6 months) - Add tooltips for action buttons - Add loading on table row action submission
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.
app/routes/__index/domains/index.tsx
Outdated
const newExpiresAt = new Date(record.expiresAt); | ||
newExpiresAt.setMonth(newExpiresAt.getMonth() + 6); | ||
|
||
await updateRecordById( |
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.
This signature is extremely hard to use and maintain. Please pass in an object instead. You can check the certificate and record models for an example if you would like to
app/routes/__index/domains/index.tsx
Outdated
); | ||
} | ||
} else if (request.method === 'DELETE') { | ||
await deleteRecordById(formalizedID); |
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 understand this correctly, this is now what we should do.
If you take the record and delete it from the FE, that will not actually delete the record from route53, it will only delete our knowledge of it.
Instead, we should kick off a worker, that removes the record from route53, then delete it from the db as well
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.
To be honest, I'd just add a TODO into the code instead of this DB tie and ship this PR.
If a PR is not merged, it's constant work to resolve conflicts and keep it up to date and ready to merge while others are working on the same piece of code
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.
Here is what the table row in the loading state looks like:
Closes #271 #272 #205