mirror of
https://github.com/bitwarden/server
synced 2025-12-19 01:33:20 +00:00
rename foles for subvault => collection
This commit is contained in:
30
src/Core/Models/Api/Request/CollectionRequestModel.cs
Normal file
30
src/Core/Models/Api/Request/CollectionRequestModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Utilities;
|
||||
using Bit.Core.Models.Table;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class CollectionRequestModel
|
||||
{
|
||||
[Required]
|
||||
[EncryptedString]
|
||||
[StringLength(300)]
|
||||
public string Name { get; set; }
|
||||
|
||||
public Collection ToCollection(Guid orgId)
|
||||
{
|
||||
return ToCollection(new Collection
|
||||
{
|
||||
OrganizationId = orgId
|
||||
});
|
||||
}
|
||||
|
||||
public Collection ToCollection(Collection existingCollection)
|
||||
{
|
||||
existingCollection.Name = Name;
|
||||
return existingCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user