1
0
mirror of https://github.com/bitwarden/server synced 2025-12-17 16:53:23 +00:00

refactor api models for other cipher types

This commit is contained in:
Kyle Spearrin
2017-09-21 10:52:23 -04:00
parent 12650a0ada
commit c58135bac5
8 changed files with 151 additions and 12 deletions

View File

@@ -26,10 +26,20 @@ namespace Bit.Core.Models.Api
Notes = cipher.Notes;
Fields = cipher.Fields;
Uri = cipher.Uri;
Username = cipher.Username;
Password = cipher.Password;
Totp = cipher.Totp;
if(cipher.Login == null)
{
Uri = cipher.Uri;
Username = cipher.Username;
Password = cipher.Password;
Totp = cipher.Totp;
}
else
{
Uri = cipher.Login.Uri;
Username = cipher.Login.Username;
Password = cipher.Login.Password;
Totp = cipher.Login.Totp;
}
}
public LoginDataModel(Cipher cipher)