mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Code cleanup
This commit is contained in:
@@ -290,7 +290,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
|
||||
.Where(subscriber => subscriber.Feed == feed && subscriber.SubscriberId == chat.Id)
|
||||
.Select(subscriber => subscriber.SubscriptionId).FirstAsync();
|
||||
|
||||
_dbContext.MarkAsDeleted(_dbContext.Find<Subscriber>(subId));
|
||||
_dbContext.Subscriptions.Remove(_dbContext.Find<Subscriber>(subId));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -298,7 +298,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
|
||||
subscription.Feed = feed;
|
||||
subscription.SubscriberId = chat.Id;
|
||||
|
||||
_dbContext.MarkAsCreated(subscription);
|
||||
_dbContext.Subscriptions.Add(subscription);
|
||||
}
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Service
|
||||
await ProcessFeed(feed, dbContext);
|
||||
|
||||
feed.UpdatedAt = DateTime.Now;
|
||||
dbContext.MarkAsModified(feed);
|
||||
dbContext.Update(feed);
|
||||
}
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
Reference in New Issue
Block a user