diff --git a/Minecraft-Realms-Emulator/Entities/Backup.cs b/Minecraft-Realms-Emulator/Entities/Backup.cs
index fc2eb8d..ec6f7cc 100644
--- a/Minecraft-Realms-Emulator/Entities/Backup.cs
+++ b/Minecraft-Realms-Emulator/Entities/Backup.cs
@@ -5,10 +5,13 @@ namespace Minecraft_Realms_Emulator.Entities
public class Backup
{
public int Id { get; set; }
- public World World { get; set; }
- public string BackupId { get; set; }
+ public Slot Slot { get; set; } = null!;
+ public string BackupId { get; set; } = null!;
public long LastModifiedDate { get; set; }
public int Size { get; set; }
- public JsonDocument Metadata { get; set; }
+ public JsonDocument Metadata { get; set; } = null!;
+ public string DownloadUrl { get; set; } = null!;
+ public string? ResourcePackUrl { get; set; } = null!;
+ public string? ResourcePackHash { get; set; } = null!;
}
}
diff --git a/Minecraft-Realms-Emulator/Middlewares/RouteLoggingMiddleware.cs b/Minecraft-Realms-Emulator/Middlewares/RouteLoggingMiddleware.cs
new file mode 100644
index 0000000..3fe82a3
--- /dev/null
+++ b/Minecraft-Realms-Emulator/Middlewares/RouteLoggingMiddleware.cs
@@ -0,0 +1,14 @@
+namespace Minecraft_Realms_Emulator.Middlewares
+{
+ public class RouteLoggingMiddleware(RequestDelegate next)
+ {
+ private readonly RequestDelegate _next = next;
+
+ public async Task Invoke(HttpContext httpContext)
+ {
+ Console.WriteLine($"{httpContext.Request.Method} {httpContext.Request.Path}{httpContext.Request.QueryString}");
+
+ await _next(httpContext);
+ }
+ }
+}
diff --git a/Minecraft-Realms-Emulator/Migrations/20240630160411_Backup_Slots.Designer.cs b/Minecraft-Realms-Emulator/Migrations/20240630160411_Backup_Slots.Designer.cs
new file mode 100644
index 0000000..0217a1d
--- /dev/null
+++ b/Minecraft-Realms-Emulator/Migrations/20240630160411_Backup_Slots.Designer.cs
@@ -0,0 +1,512 @@
+//
+using System;
+using System.Text.Json;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Minecraft_Realms_Emulator.Data;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace Minecraft_Realms_Emulator.Migrations
+{
+ [DbContext(typeof(DataContext))]
+ [Migration("20240630160411_Backup_Slots")]
+ partial class Backup_Slots
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Minecraft_Realms_Emulator.Entities.Backup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BackupId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("DownloadUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("LastModifiedDate")
+ .HasColumnType("bigint");
+
+ b.Property("Metadata")
+ .IsRequired()
+ .HasColumnType("jsonb");
+
+ b.Property("ResourcePackHash")
+ .HasColumnType("text");
+
+ b.Property("ResourcePackUrl")
+ .HasColumnType("text");
+
+ b.Property("Size")
+ .HasColumnType("integer");
+
+ b.Property("SlotId")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SlotId");
+
+ b.ToTable("Backups");
+ });
+
+ modelBuilder.Entity("Minecraft_Realms_Emulator.Entities.Configuration", b =>
+ {
+ b.Property("Key")
+ .HasColumnType("text");
+
+ b.Property