Finished the migration to MongoDb (NOT TESTED)

This commit is contained in:
2024-12-15 17:32:26 +03:30
parent fbe0d500d9
commit ef8c7f2ee9
6 changed files with 48 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
using CatsOfMastodonBot.Models;
using JsonFlatFileDataStore;
using Microsoft.Extensions.Logging;
using MongoDB.Driver;
using mstdnCats.Models;
using Telegram.Bot;
using Telegram.Bot.Types.Enums;
@@ -10,7 +11,7 @@ namespace mstdnCats.Services
{
public class ProcessPosts
{
public static async Task<List<MediaAttachment>> checkAndInsertPostsAsync(IDocumentCollection<Post> _db, TelegramBotClient _bot, List<Post> fetchedPosts, ILogger<MastodonBot>? logger)
public static async Task<List<MediaAttachment>> checkAndInsertPostsAsync(IMongoCollection<Post> _db, TelegramBotClient _bot, List<Post> fetchedPosts, ILogger<MastodonBot>? logger)
{
var config = ConfigData.fetchData();