1
0
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:
Kyle Spearrin
2017-01-02 21:52:13 -05:00
parent 7e56797847
commit 9cde513026
11 changed files with 86 additions and 68 deletions

View File

@ -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) + ".");

View File

@ -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();