Merge branch 'master' of https://github.com/Amatsugu/AobaV2
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
global using MaybeError;
|
||||
|
||||
using AobaCore.Services;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using MongoDB.Driver;
|
||||
|
||||
5
AobaCore/Models/MeidaThumbnail.cs
Normal file
5
AobaCore/Models/MeidaThumbnail.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace AobaCore.Models;
|
||||
|
||||
internal class MeidaThumbnail
|
||||
{
|
||||
}
|
||||
@@ -12,7 +12,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AobaCore;
|
||||
namespace AobaCore.Services;
|
||||
public class AccountsService(IMongoDatabase db)
|
||||
{
|
||||
public readonly IMongoCollection<User> _users = db.GetCollection<User>("users");
|
||||
@@ -4,7 +4,7 @@ using Microsoft.Extensions.Hosting;
|
||||
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace AobaCore;
|
||||
namespace AobaCore.Services;
|
||||
|
||||
public class AobaIndexCreationService(IMongoDatabase db): BackgroundService
|
||||
{
|
||||
@@ -6,7 +6,7 @@ using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.GridFS;
|
||||
|
||||
namespace AobaCore;
|
||||
namespace AobaCore.Services;
|
||||
|
||||
public class AobaService(IMongoDatabase db)
|
||||
{
|
||||
28
AobaCore/Services/ThumbnailService.cs
Normal file
28
AobaCore/Services/ThumbnailService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using AobaCore.Models;
|
||||
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.GridFS;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AobaCore.Services;
|
||||
internal class ThumbnailService(IMongoDatabase db, AobaService aobaService)
|
||||
{
|
||||
private readonly GridFSBucket _gridfs = new GridFSBucket(db);
|
||||
private readonly IMongoCollection<MeidaThumbnail> _thumbnails = db.GetCollection<MeidaThumbnail>("thumbs");
|
||||
|
||||
public async Task<MemoryStream> GetThumbnailAsync(ObjectId id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task GenerateThumbnailAsync(ObjectId id)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using AobaCore;
|
||||
using AobaCore.Models;
|
||||
using AobaCore.Models;
|
||||
using AobaCore.Services;
|
||||
|
||||
using AobaServer.Utils;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using AobaCore;
|
||||
using AobaCore.Services;
|
||||
|
||||
using AobaServer.Models;
|
||||
using AobaServer.Utils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using AobaCore;
|
||||
using AobaCore.Services;
|
||||
|
||||
using HeyRed.Mime;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Aoba.RPC.Auth;
|
||||
|
||||
using AobaCore;
|
||||
using AobaCore.Models;
|
||||
using AobaCore.Services;
|
||||
|
||||
using AobaServer.Models;
|
||||
using AobaServer.Utils;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Aoba.RPC;
|
||||
|
||||
using AobaCore;
|
||||
using AobaCore.Services;
|
||||
|
||||
using AobaServer.Models;
|
||||
using AobaServer.Utils;
|
||||
|
||||
Reference in New Issue
Block a user