-
-
Notifications
You must be signed in to change notification settings - Fork 18
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(console): delete app modal checks custom domain config #2373
Conversation
before you can delete the application. | ||
</Text> | ||
|
||
<Link to={`/apps/${appDetails.clientId}/domain-wip`} className="self-end"> |
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 will be set to final route as part of #2374
<HasCustomDomain appDetails={appDetails}></HasCustomDomain> | ||
)} | ||
{!hasCustomDomain && ( | ||
<DeleteModalAppForm |
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.
The form inside DeleteModalAppForm makes a post
to /apps/delete. This API route also needs to do this check on the backend and throw an error.
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.
Done.
37f8309
to
b4d56ed
Compare
@@ -28,6 +29,11 @@ export const deleteApp = async ({ | |||
ctx.StarbaseApp | |||
) | |||
|
|||
if (await appDO.storage.get('customDomain')) | |||
throw new BadRequestError({ | |||
message: 'HAS_CUSTOM_DOMAIN', |
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.
The code
property is restricted but error objects could have another property for enum-like names. In this case, the error representation doesn't depend on the message in the object so using the code name in the message property is pragmatic.
27c0844
to
f567f93
Compare
f567f93
to
0654794
Compare
0654794
to
fe9a37a
Compare
Updated. |
Description
The delete application modal displays a message that application has a custom
domain configured.
Related Issues
Testing
Checklist