forgejo/routers/api/v1/user
Mathieu Fenniak 1d99ce0242 fix: incorrect DB error handling in 'POST /users/{username}/tokens' (#11682)
Came across a coding error from #11504 while working on adding a UI for repo-specific access tokens.  I couldn't find a practical way to test this fix as there are no expected error conditions that will be returned here, just database-level errors, and the `SetFaultInjector` capability in testing is only integrated into unit tests, not integration tests.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11682
Reviewed-by: Cyborus <cyborus@disroot.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2026-03-15 07:43:33 +01:00
..
action.go chore(lint): Add exceptions for dbfs_model and unittest (#10275) 2025-12-09 14:34:06 +01:00
app.go fix: incorrect DB error handling in 'POST /users/{username}/tokens' (#11682) 2026-03-15 07:43:33 +01:00
avatar.go chore(api): update swagger method descripitons (#8728) 2025-07-30 18:08:28 +02:00
email.go chore(api): update swagger method descripitons (#8728) 2025-07-30 18:08:28 +02:00
follower.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
gpg_key.go Update Swagger annotations to reflect actual behavior (#9138) 2025-09-15 11:55:49 +02:00
helper.go fix: do visibility check for user redirect lookup 2025-08-30 09:37:25 +02:00
hook.go feat: remove admin-level permissions from repo-specific & public-only access tokens (#11468) 2026-03-04 16:17:41 +01:00
key.go feat: remove admin-level permissions from repo-specific & public-only access tokens (#11468) 2026-03-04 16:17:41 +01:00
quota.go Update Swagger annotations to reflect actual behavior (#9138) 2025-09-15 11:55:49 +02:00
repo.go feat: remove admin-level permissions from repo-specific & public-only access tokens (#11468) 2026-03-04 16:17:41 +01:00
runners.go feat: add visible flag to HTTP API endpoints that return runners (#11670) 2026-03-14 04:22:01 +01:00
settings.go chore(api): update swagger method descripitons (#8728) 2025-07-30 18:08:28 +02:00
star.go feat: implement fine-grained access tokens in /user/starred & /users/{username}/starred 2026-03-01 17:05:53 +01:00
user.go feat: remove admin-level permissions from repo-specific & public-only access tokens (#11468) 2026-03-04 16:17:41 +01:00
watch.go feat: implement fine-grained access tokens in /user/subscriptions & /users/{username}/subscriptions 2026-03-01 17:05:53 +01:00