mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-07-15 14:22:28 -05:00
Add PUT /api/v2/user/settings/avatar, the first multipart/form-data file upload on the Huma-backed v2 API. Reuses v1's byte-level mime validation (mimetype.DetectReader) and storage (upload.StoreAvatarFile), modeling the request as a huma.MultipartFormFiles input so it renders as multipart/form-data in the OpenAPI spec instead of being read off the raw echo context. Flips the user's avatar provider to "upload" on success. Authenticated (JWT).
24 lines
1017 B
Go
24 lines
1017 B
Go
// Vikunja is a to-do list application to facilitate your life.
|
|
// Copyright 2018-present Vikunja and contributors. All rights reserved.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
package models
|
|
|
|
// Message is a standard message
|
|
type Message struct {
|
|
// A standard message.
|
|
Message string `json:"message" readOnly:"true" doc:"A human-readable status message returned by the server."`
|
|
}
|