refactor(api/v2): register upload route as RegisterAvatarUploadRoutes

Avoids a duplicate RegisterAvatarRoutes declaration in package apiv2 now that
the avatar GET route (#2818) is on main; both routes are registered distinctly.
This commit is contained in:
kolaente 2026-06-02 10:33:11 +02:00 committed by kolaente
parent b18e051ab3
commit 220af19a39
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ type avatarUploadBody struct {
Body *models.Message
}
func RegisterAvatarRoutes(api huma.API) {
func RegisterAvatarUploadRoutes(api huma.API) {
tags := []string{"user"}
Register(api, huma.Operation{

View File

@ -421,6 +421,7 @@ func registerAPIRoutesV2(e *echo.Echo, a *echo.Group) {
apiv2.RegisterProjectViewRoutes(api)
apiv2.RegisterAdminProjectRoutes(api)
apiv2.RegisterAvatarRoutes(api)
apiv2.RegisterAvatarUploadRoutes(api)
// AutoPatch must run AFTER all GET/PUT pairs are registered so it can
// synthesize their PATCH counterparts.