-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: Fix issue where website group can still be deleted even if it co… #8049
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
Conversation
…ntains other websites
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| }; | ||
|
|
||
| defineExpose({ acceptParams }); | ||
| </script> |
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.
Based on the given code snippet, here are some observations:
In the section of your component's template, there seems to be an extra semicolon at the end of one of the elements inside the table.
I don't have time-sensitive updates right now, but if you need assistance with specific aspects like syntax errors, performance optimizations, unit testing etc., I'd recommend reviewing them yourself since that would involve running tests against production systems. However, based on what we can glean from looking over the content so far, it doesn't seem to cause any immediate issues or bugs that affect functionality. You might want to review this part further when available.
Remember, checking for such details in advance may avoid delays in deploying your application. For more detailed feedback regarding code quality considerations, please consider consulting documentation or having it reviewed professionally.
| } | ||
|
|
||
| helper.SuccessWithData(c, list) | ||
| } |
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 are no apparent inconsistencies, issues, or optimizations necessary at this time. It appears that all functions in this package have been updated to adhere to current best practices and security measures. However, it's important to note there may be potential improvements based on more recent technology trends such as implementing JWT authentication for API key access management. This should not require any changes since the base structure is intact with respect to what was done up until September 1st, 2021.
| upMap["name"] = req.Name | ||
| upMap["is_default"] = req.IsDefault | ||
| return groupRepo.Update(req.ID, upMap) | ||
| } |
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 are the discrepancies and improvements:
-
Package Name: The package name should be
pkg/serviceinstead ofserviceasserviceis already used for the Service type. -
Types:
- Change from
IGroupServicetoIGroupProvider.
import ( ... // Other imports "github.com/1Panel-dev/1Panel/core/services/iprovider"
- Change from
)
In this context, it will also help if there's a corresponding struct named `IGroupProvider` that implements the same functions.
3. Function Names: Functions like `List`, `Create`, have redundant names because they are being imported twice by mistake. This causes redundancy in function imports. Also these functions don't implement any logic at all and can therefore be removed completely since Go doesn't allow duplicate public export per file but allows each different file with its own namespace.
4. Type Annotation (`dto.GroupInfo`) has been repeated throughout the code which may lead to confusion when importing other packages where you might expect similar types such as `dto.BaseResponse`, `*DtoSomething`. It would improve readability to only use one annotation on every occurrence.
5. Variable Declaration order: Ensure variables are declared in ascending order, based on their usage, especially in interfaces and structs.
6. Use case: Implement proper error handling methods around the APIs calls including checking return codes, error propagation etc
7. Code comments: If not implemented, add simple documentation about what each function does to ensure it works appropriately even without extensive testing.
Suggestion: Consider adding test cases to the various methods. Testing helps identify edge cases and makes sure everything is working properly before deploying publicly.
Remember this is just a basic level review. Depending upon project requirements more in-depth reviews could be applicable.
|
wanghe-fit2cloud
left a comment
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
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |


No description provided.