1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

convert fav and folder json to userid object

This commit is contained in:
Kyle Spearrin
2017-04-17 11:44:09 -04:00
parent f21652b46b
commit a684e03819
3 changed files with 27 additions and 171 deletions

View File

@ -192,7 +192,7 @@ namespace Bit.Core.Services
if(cipher.UserId.HasValue && cipher.Favorite)
{
cipher.Favorites = $"[{{\"u\":\"{cipher.UserId.ToString().ToUpperInvariant()}\"}}]";
cipher.Favorites = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":\"true\"}}";
}
}
@ -213,8 +213,8 @@ namespace Bit.Core.Services
continue;
}
cipher.Folders = $"[{{\"u\":\"{cipher.UserId.ToString().ToUpperInvariant()}\"," +
$"\"f\":\"{folder.Id.ToString().ToUpperInvariant()}\"}}]";
cipher.Folders = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":" +
$"\"{folder.Id.ToString().ToUpperInvariant()}\"}}";
}
// Create it all