1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

added groups apis

This commit is contained in:
Kyle Spearrin
2017-05-08 14:08:44 -04:00
parent a03c19d693
commit fdf7546f33
16 changed files with 323 additions and 7 deletions

View File

@ -0,0 +1,28 @@
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Core.Models.Table;
using Newtonsoft.Json;
namespace Bit.Core.Models.Api
{
public class GroupRequestModel
{
[Required]
[StringLength(300)]
public string Name { get; set; }
public Group ToGroup(Guid orgId)
{
return ToGroup(new Group
{
OrganizationId = orgId
});
}
public Group ToGroup(Group existingGroup)
{
existingGroup.Name = Name;
return existingGroup;
}
}
}