mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
new app server and database + added hub and controller of user profile
This commit is contained in:
@@ -64,6 +64,8 @@ public class AdminsRepository(GovorDbContext context, IObjectValidator<Admin> va
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found admin by given id {admin.UserId}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -87,6 +87,8 @@ public class FriendshipsRepository : IFriendshipsRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found friendship by given id {friendship.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -117,6 +117,8 @@ public class GroupRepository : IGroupsRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found group by given id {group.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -100,6 +100,8 @@ public class InvitesRepository : IInvitesRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found invitation by given id {invitation.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -82,6 +82,8 @@ public class MediaAttachmentsRepository : IMediaAttachmentsRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found attachments by given id {attachments.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -128,6 +128,8 @@ public class MessagesRepository : IMessagesRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found message by given id {message.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -77,6 +77,8 @@ public class PrivateChatsRepository : IPrivateChatsRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found private chat by given id {chat.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -102,6 +102,8 @@ public class UserSessionsRepository : IUserSessionsRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found user session by given id {userSession.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,8 @@ public class UsersRepository : IUsersRepository
|
||||
|
||||
if (rowsAffected == 0)
|
||||
throw new UpdateException($"Not found user by given id {user.Id}");
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user