-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Refactor secrets modification logic #26873
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
KN4CK3R
commented
Sep 1, 2023
- Share code between web and api
- Add some tests
"code.gitea.io/gitea/modules/web" | ||
"code.gitea.io/gitea/routers/api/v1/utils" | ||
"code.gitea.io/gitea/routers/web/shared/actions" | ||
secret_service "code.gitea.io/gitea/services/secrets" |
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.
Can't use 007
as import name 😢
OK, I can see that this case is handled by |
return secret_model.ErrSecretNotFound{} | ||
} | ||
|
||
return deleteSecret(ctx, s[0]) |
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.
Just a question, why not deleteSecret(ctx, s[0].ID)
?
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.
Had the audit PR in my mind because I need the full object there. deleteSecret
would be the method where the log is created.
* giteaofficial/main: Add missing translation (go-gitea#26926) Vendor `jquery.are-you-sure` with strict mode fixes (go-gitea#26901) Fix the secret regexp pattern on web page (go-gitea#26910) Add @chenrui333 as maintainer (go-gitea#26917) Move notification interface to services layer (go-gitea#26915) fetch emails of currently displayed user on admin page (go-gitea#26918) Improve LDAP group config documentation, fixes go-gitea#21159 (go-gitea#21227) update footer link to new landing page (go-gitea#26916) Remove `Named` interface (go-gitea#26913) Refactor secrets modification logic (go-gitea#26873) Add missing `reqToken()` to notifications endpoints (go-gitea#26914) feat(API): add routes and functions for managing user's secrets (go-gitea#26909) Move feed notification service layer (go-gitea#26908) Extract common code to new template (go-gitea#26903) Move ui notification to service layer (go-gitea#26907) Remove duplicated notify mail configuration on tests (go-gitea#26912) Move indexer notification to service layer (go-gitea#26906) # Conflicts: # templates/base/footer_content.tmpl