feat: rename boring avatar to marble (because that's what it is)
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
eb1254a230
commit
a10d162f5e
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public Licensee
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package boring
|
||||
package marble
|
||||
|
||||
import (
|
||||
"math"
|
|
@ -22,10 +22,10 @@ import (
|
|||
"code.vikunja.io/api/pkg/log"
|
||||
"code.vikunja.io/api/pkg/models"
|
||||
"code.vikunja.io/api/pkg/modules/avatar"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/boring"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/empty"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/gravatar"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/initials"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/marble"
|
||||
"code.vikunja.io/api/pkg/modules/avatar/upload"
|
||||
"code.vikunja.io/api/pkg/user"
|
||||
"code.vikunja.io/web/handler"
|
||||
|
@ -78,8 +78,8 @@ func GetAvatar(c echo.Context) error {
|
|||
avatarProvider = &initials.Provider{}
|
||||
case "upload":
|
||||
avatarProvider = &upload.Provider{}
|
||||
case "boring":
|
||||
avatarProvider = &boring.Provider{}
|
||||
case "marble":
|
||||
avatarProvider = &marble.Provider{}
|
||||
default:
|
||||
avatarProvider = &empty.Provider{}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// UserAvatarProvider holds the user avatar provider type
|
||||
type UserAvatarProvider struct {
|
||||
// The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `boring` (generates a random avatar for each user), `default`.
|
||||
// The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `marble` (generates a random avatar for each user), `default`.
|
||||
AvatarProvider string `json:"avatar_provider"`
|
||||
}
|
||||
|
||||
|
|
|
@ -8915,7 +8915,7 @@ var doc = `{
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_provider": {
|
||||
"description": "The avatar provider. Valid types are ` + "`" + `gravatar` + "`" + ` (uses the user email), ` + "`" + `upload` + "`" + `, ` + "`" + `initials` + "`" + `, ` + "`" + `boring` + "`" + ` (generates a random avatar for each user), ` + "`" + `default` + "`" + `.",
|
||||
"description": "The avatar provider. Valid types are ` + "`" + `gravatar` + "`" + ` (uses the user email), ` + "`" + `upload` + "`" + `, ` + "`" + `initials` + "`" + `, ` + "`" + `marble` + "`" + ` (generates a random avatar for each user), ` + "`" + `default` + "`" + `.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8899,7 +8899,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_provider": {
|
||||
"description": "The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `boring` (generates a random avatar for each user), `default`.",
|
||||
"description": "The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `marble` (generates a random avatar for each user), `default`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1235,7 +1235,7 @@ definitions:
|
|||
properties:
|
||||
avatar_provider:
|
||||
description: The avatar provider. Valid types are `gravatar` (uses the user
|
||||
email), `upload`, `initials`, `boring` (generates a random avatar for each
|
||||
email), `upload`, `initials`, `marble` (generates a random avatar for each
|
||||
user), `default`.
|
||||
type: string
|
||||
type: object
|
||||
|
|
|
@ -455,7 +455,8 @@ func UpdateUser(s *xorm.Session, user *User) (updatedUser *User, err error) {
|
|||
if user.AvatarProvider != "default" &&
|
||||
user.AvatarProvider != "gravatar" &&
|
||||
user.AvatarProvider != "initials" &&
|
||||
user.AvatarProvider != "upload" {
|
||||
user.AvatarProvider != "upload" &&
|
||||
user.AvatarProvider != "marble" {
|
||||
return updatedUser, &ErrInvalidAvatarProvider{AvatarProvider: user.AvatarProvider}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue