vikunja/pkg/routes/api/v1
kolaente 46b07a019c refactor(user): extract shared account orchestration into models/user/shared for v1+v2
Pull the business logic out of the v1 current-user account/settings handlers
into reusable functions so both v1 and the upcoming v2 handlers call one
implementation. No behavior change — the v1 handlers keep their HTTP-layer
quirks (input binding, validation, error mapping); only orchestration moves.

Homes are forced by the import graph:
- shared.GetAuthProviderName  (new pkg/routes/api/shared, above openid+user so it
                              can combine both without a cycle; routes-only helper)
- user.ChangeUserEmail        (CheckUserCredentials + UpdateEmail, both in user)
- models.ChangeUserPassword   (needs models.DeleteAllUserSessions; user can't import models)
- models.UpdateUserGeneralSettings / UpdateUserAvatarProvider
                              (need avatar.FlushAllCaches; user can't import avatar)

The general settings get a single shared wire struct, models.UserGeneralSettings
(tagged for both swaggo/govalidator and Huma): it is the update request body and
the nested settings on GET /user for v1 (replacing v1's UserSettings) and v2.
ExtraSettingsLinks is readOnly — populated from the user on read, ignored on
write. A dedicated struct is required because user.User's settings fields are
json:"-" so they don't leak when it is embedded in other responses.
2026-06-11 07:02:31 +00:00
..
admin fix(admin): reload created user before returning in admin create handler 2026-04-20 18:55:06 +00:00
redoc fix(api/docs): Use Base in redoc template 2026-04-20 14:26:49 +00:00
avatar.go refactor(avatar): share avatar-upload logic between v1 and v2 handlers 2026-06-02 11:55:25 +00:00
docs.go fix(api/docs): Use Base in redoc template 2026-04-20 14:26:49 +00:00
info.go fix: respect allow_icon_changes config on web and desktop 2026-06-01 09:40:37 +00:00
link_sharing_auth.go fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00
login.go feat(auth): reject password login for bot users 2026-05-01 14:44:10 +00:00
notifications.go fix: add missing Commit() to write callers 2026-02-25 11:03:02 +01:00
task_attachment.go refactor(task-attachment): share upload+download via pkg/web/files for v1+v2 2026-06-10 10:22:39 +00:00
task_by_index.go feat(api): accept project identifier in by-index task route 2026-05-19 08:53:25 +00:00
testing.go feat(license): add runtime state snapshot and reload helpers 2026-04-20 18:55:06 +00:00
token_check.go fix(auth): don't panic on /token/test with API token 2026-05-01 11:13:12 +02:00
user_caldav_token.go fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00
user_confirm_email.go fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00
user_deletion.go refactor: remove redundant Begin() calls after NewSession auto-begins 2026-02-25 11:03:02 +01:00
user_export.go fix: use file mime type instead of hardcoded application/zip in S3 export 2026-03-20 10:59:44 +01:00
user_list.go docs: update user search endpoint description for external team bypass 2026-03-04 20:32:11 +01:00
user_password_reset.go feat(api): enforce password validation on reset and update flows 2026-02-25 13:44:56 +01:00
user_register.go feat(metrics): invalidate the user count cache on registration 2026-05-30 13:48:01 +00:00
user_settings.go refactor(user): extract shared account orchestration into models/user/shared for v1+v2 2026-06-11 07:02:31 +00:00
user_show.go refactor(user): extract shared account orchestration into models/user/shared for v1+v2 2026-06-11 07:02:31 +00:00
user_totp.go fix: invalidate all sessions when enabling TOTP 2026-03-19 12:27:44 +01:00
user_update_email.go refactor(user): extract shared account orchestration into models/user/shared for v1+v2 2026-06-11 07:02:31 +00:00
user_update_password.go refactor(user): extract shared account orchestration into models/user/shared for v1+v2 2026-06-11 07:02:31 +00:00
user_webhooks.go fix: strip BasicAuth credentials from user webhook API responses 2026-03-23 16:35:47 +00:00
webhooks.go fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00