1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-09 15:18:13 -05:00
bitwarden/src/Api/Models/Request/Accounts/UpdateAvatarRequestModel.cs
Brandon Maharaj aa1f443530
[SG-58] Avatar color selector ()
* chore: backend work

* changed typing to match efc

* Update User_Update.sql

* fix: script cleanup

* fix: adjust max length

* fix: adjust max length

* fix: added missing script changes

* fix: use short form for creating objects

* add: mysql migrations

* chore: add mysql script

* chore: posgres migrations

* chore: postgres migrations

* fix: lint

* Update 20221115034053_AvatarColor.cs

* fix: removed gravatar inline ()

Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2023-01-01 11:28:59 -05:00

17 lines
358 B
C#

using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
namespace Bit.Api.Models.Request.Accounts;
public class UpdateAvatarRequestModel
{
[StringLength(7)]
public string AvatarColor { get; set; }
public User ToUser(User existingUser)
{
existingUser.AvatarColor = AvatarColor;
return existingUser;
}
}