mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 10:55:43 -05:00
Refactor naming: Sites => Logins
This commit is contained in:
@ -24,8 +24,8 @@ namespace Bit.Api.Models
|
||||
case Core.Enums.CipherType.Folder:
|
||||
Data = new FolderDataModel(cipher);
|
||||
break;
|
||||
case Core.Enums.CipherType.Site:
|
||||
Data = new SiteDataModel(cipher);
|
||||
case Core.Enums.CipherType.Login:
|
||||
Data = new LoginDataModel(cipher);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("Unsupported " + nameof(Type) + ".");
|
||||
|
@ -3,22 +3,22 @@ using Bit.Core.Domains;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
{
|
||||
public class SiteResponseModel : ResponseModel
|
||||
public class LoginResponseModel : ResponseModel
|
||||
{
|
||||
public SiteResponseModel(Cipher cipher)
|
||||
: base("site")
|
||||
public LoginResponseModel(Cipher cipher)
|
||||
: base("login")
|
||||
{
|
||||
if(cipher == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(cipher));
|
||||
}
|
||||
|
||||
if(cipher.Type != Core.Enums.CipherType.Site)
|
||||
if(cipher.Type != Core.Enums.CipherType.Login)
|
||||
{
|
||||
throw new ArgumentException(nameof(cipher.Type));
|
||||
}
|
||||
|
||||
var data = new SiteDataModel(cipher);
|
||||
var data = new LoginDataModel(cipher);
|
||||
|
||||
Id = cipher.Id.ToString();
|
||||
FolderId = cipher.FolderId?.ToString();
|
Reference in New Issue
Block a user