diff --git a/Notesnook.API/Controllers/UsersController.cs b/Notesnook.API/Controllers/UsersController.cs index 2f70ac4..647e110 100644 --- a/Notesnook.API/Controllers/UsersController.cs +++ b/Notesnook.API/Controllers/UsersController.cs @@ -78,9 +78,6 @@ namespace Notesnook.API.Controllers if (user.AttachmentsKey != null) await UserService.SetUserAttachmentsKeyAsync(response.UserId, user.AttachmentsKey); - else if (user.Profile != null) - await UserService.SetUserProfileAsync(response.UserId, user.Profile); - else return BadRequest(); return Ok(); } diff --git a/Notesnook.API/Interfaces/IUserService.cs b/Notesnook.API/Interfaces/IUserService.cs index a4ce240..dc84d08 100644 --- a/Notesnook.API/Interfaces/IUserService.cs +++ b/Notesnook.API/Interfaces/IUserService.cs @@ -31,6 +31,5 @@ namespace Notesnook.API.Interfaces Task ResetUserAsync(string userId, bool removeAttachments); Task GetUserAsync(bool repair = true); Task SetUserAttachmentsKeyAsync(string userId, IEncrypted key); - Task SetUserProfileAsync(string userId, IEncrypted profile); } } \ No newline at end of file diff --git a/Notesnook.API/Models/UserSettings.cs b/Notesnook.API/Models/UserSettings.cs index 77675e6..885ec93 100644 --- a/Notesnook.API/Models/UserSettings.cs +++ b/Notesnook.API/Models/UserSettings.cs @@ -34,7 +34,6 @@ namespace Notesnook.API.Models public string Salt { get; set; } public EncryptedData VaultKey { get; set; } public EncryptedData AttachmentsKey { get; set; } - public EncryptedData Profile { get; set; } [BsonId] [BsonRepresentation(BsonType.ObjectId)] diff --git a/Notesnook.API/Services/UserService.cs b/Notesnook.API/Services/UserService.cs index c2581fc..82c4796 100644 --- a/Notesnook.API/Services/UserService.cs +++ b/Notesnook.API/Services/UserService.cs @@ -18,7 +18,9 @@ along with this program. If not, see . */ using System; +using System.IO; using System.Net.Http; +using System.Text; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -154,7 +156,6 @@ namespace Notesnook.API.Services response.AttachmentsKey = userSettings.AttachmentsKey; response.Salt = userSettings.Salt; response.Subscription = subscription; - response.Profile = userSettings.Profile; return response; } @@ -165,13 +166,6 @@ namespace Notesnook.API.Services await Repositories.UsersSettings.UpdateAsync(userSettings.Id, userSettings); } - public async Task SetUserProfileAsync(string userId, IEncrypted profile) - { - var userSettings = await Repositories.UsersSettings.FindOneAsync((u) => u.UserId == userId); - userSettings.Profile = (EncryptedData)profile; - await Repositories.UsersSettings.UpdateAsync(userSettings.Id, userSettings); - } - public async Task DeleteUserAsync(string userId, string jti) { try