1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

Move request/response models (#1754)

This commit is contained in:
Oscar Hinton
2021-12-14 15:05:07 +00:00
committed by GitHub
parent 3ae573bd8d
commit 63f6dd9a24
206 changed files with 641 additions and 516 deletions

View File

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using Bit.Core.Enums;
using Bit.Core.Models.Api;
namespace Bit.Core.Models.Data
{
@ -12,17 +11,6 @@ namespace Bit.Core.Models.Data
public CipherLoginData() { }
public CipherLoginData(CipherRequestModel cipher)
: base(cipher)
{
Uris = cipher.Login.Uris?.Where(u => u != null).Select(u => new CipherLoginUriData(u));
Username = cipher.Login.Username;
Password = cipher.Login.Password;
PasswordRevisionDate = cipher.Login.PasswordRevisionDate;
Totp = cipher.Login.Totp;
AutofillOnPageLoad = cipher.Login.AutofillOnPageLoad;
}
public string Uri
{
get => Uris?.FirstOrDefault()?.Uri ?? _uri;
@ -39,12 +27,6 @@ namespace Bit.Core.Models.Data
{
public CipherLoginUriData() { }
public CipherLoginUriData(CipherLoginModel.CipherLoginUriModel uri)
{
Uri = uri.Uri;
Match = uri.Match;
}
public string Uri { get; set; }
public UriMatchType? Match { get; set; } = null;
}