refactor: move shared code to Shared directory

This commit is contained in:
CyberL1 2024-12-09 14:30:18 +01:00
parent 92a9177d1f
commit d302ea46e2
100 changed files with 200 additions and 203 deletions

View File

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -4,7 +4,7 @@ using System.Text.Json;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Shared.Data;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Requests;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
namespace Minecraft_Realms_Emulator.Modes.External
{

View File

@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Requests;
using Minecraft_Realms_Emulator.Shared.Responses;
using Newtonsoft.Json;
namespace Minecraft_Realms_Emulator.Modes.External

View File

@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
using Newtonsoft.Json;
namespace Minecraft_Realms_Emulator.Modes.Realms

View File

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Requests;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
{

View File

@ -1,13 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Modes.Realms.Helpers;
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Requests;
using Minecraft_Realms_Emulator.Shared.Responses;
using Newtonsoft.Json;
using System.Net;
using System.Net.Sockets;

View File

@ -1,4 +1,4 @@
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Entities;
using System.Diagnostics;
namespace Minecraft_Realms_Emulator.Modes.Realms.Helpers

View File

@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Rewrite;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Middlewares;
using Minecraft_Realms_Emulator.Shared.Enums;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Middlewares;
using Npgsql;
using System.Diagnostics;
using System.Reflection;

View File

@ -1,9 +0,0 @@
using Minecraft_Realms_Emulator.Entities;
namespace Minecraft_Realms_Emulator.Responses
{
public class BackupsResponse
{
public List<Backup> Backups { get; set; }
}
}

View File

@ -1,6 +1,4 @@
using Minecraft_Realms_Emulator.Entities;
namespace Minecraft_Realms_Emulator.Attributes
namespace Minecraft_Realms_Emulator.Shared.Attributes
{
[AttributeUsage(AttributeTargets.Method)]
public class CheckActiveSubscription : Attribute

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Attributes
namespace Minecraft_Realms_Emulator.Shared.Attributes
{
[AttributeUsage(AttributeTargets.Method)]
public class CheckForWorldAttribute : Attribute

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Attributes
namespace Minecraft_Realms_Emulator.Shared.Attributes
{
[AttributeUsage(AttributeTargets.Method)]
public class CheckRealmOwnerAttribute : Attribute

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Attributes
namespace Minecraft_Realms_Emulator.Shared.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
public class RequireAdminKeyAttribute : Attribute

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Attributes
namespace Minecraft_Realms_Emulator.Shared.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
public class RequireMinecraftCookieAttribute : Attribute

View File

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Helpers;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Controllers.Admin
namespace Minecraft_Realms_Emulator.Shared.Controllers.Admin
{
[Route("api/admin/[controller]")]
[ApiController]

View File

@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Modes.Realms.Helpers;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Controllers.Admin
namespace Minecraft_Realms_Emulator.Shared.Controllers.Admin
{
[Route("api/admin/[controller]")]
[ApiController]
@ -28,7 +28,8 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin
[HttpGet("{wId}")]
[CheckForWorld]
public ActionResult<World> GetWorld(int wId) {
public ActionResult<World> GetWorld(int wId)
{
var world = _context.Worlds.ToList().Find(w => w.Id == wId);
return Ok(world);

View File

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Data
namespace Minecraft_Realms_Emulator.Shared.Data
{
public class DataContext(DbContextOptions<DataContext> options) : DbContext(options)
{

View File

@ -1,6 +1,6 @@
using System.Text.Json;
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Backup
{

View File

@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
[PrimaryKey(nameof(Key))]
public class Configuration

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Connection
{

View File

@ -1,9 +1,9 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Invite
{
public int Id { get; set; }
public string InvitationId { get; set; }= string.Empty;
public string InvitationId { get; set; } = string.Empty;
public string RecipeintUUID { get; set; } = string.Empty;
public World World { get; set; }
public DateTime Date { get; set; }

View File

@ -1,6 +1,6 @@
using System.Text.Json;
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Notification
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Player
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class SeenNotification
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Shared.Requests;
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Slot : SlotOptionsRequest
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Subscription
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class Template
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Entities
{
public class World
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum CompatibilityEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum SettingsEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum StateEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum SubscriptionTypeEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum VersionCompatibilityEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum WorkModeEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum WorldTemplateTypeEnum
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Enums
namespace Minecraft_Realms_Emulator.Shared.Enums
{
public enum WorldTypeEnum
{

View File

@ -1,8 +1,8 @@
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Newtonsoft.Json;
namespace Minecraft_Realms_Emulator.Helpers
namespace Minecraft_Realms_Emulator.Shared.Helpers
{
public class ConfigHelper
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Enums;
using Minecraft_Realms_Emulator.Shared.Enums;
namespace Minecraft_Realms_Emulator.Helpers.Config
namespace Minecraft_Realms_Emulator.Shared.Helpers.Config
{
public class Settings
{

View File

@ -1,10 +1,10 @@
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Helpers.Config;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Helpers.Config;
using Minecraft_Realms_Emulator.Shared.Data;
using Newtonsoft.Json;
namespace Minecraft_Realms_Emulator.Helpers
namespace Minecraft_Realms_Emulator.Shared.Helpers
{
public class Database
{

View File

@ -1,9 +1,9 @@
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Responses;
using Newtonsoft.Json;
using System.Net.Sockets;
using System.Text;
namespace Minecraft_Realms_Emulator.Helpers
namespace Minecraft_Realms_Emulator.Shared.Helpers
{
public class MinecraftServerQuery
{

View File

@ -1,6 +1,6 @@
using System.Text.RegularExpressions;
namespace Minecraft_Realms_Emulator.Helpers
namespace Minecraft_Realms_Emulator.Shared.Helpers
{
public class MinecraftVersionParser
{

View File

@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class ActiveSubscriptionMiddleware(RequestDelegate next)
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Shared.Attributes;
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class AdminKeyMiddleware(RequestDelegate next)
{

View File

@ -1,9 +1,9 @@
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
using Minecraft_Realms_Emulator.Shared.Responses;
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class CheckForWorldMiddleware(RequestDelegate next)
{

View File

@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Attributes;
using Minecraft_Realms_Emulator.Shared.Data;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class CheckRealmOwnerMiddleware(RequestDelegate next)
{

View File

@ -1,7 +1,7 @@
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Shared.Attributes;
using System.Text;
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class MinecraftCookieMiddleware(RequestDelegate next)
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Middlewares
namespace Minecraft_Realms_Emulator.Shared.Middlewares
{
public class RouteLoggingMiddleware(RequestDelegate next)
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Requests
namespace Minecraft_Realms_Emulator.Shared.Requests
{
public class PlayerRequest
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Requests
namespace Minecraft_Realms_Emulator.Shared.Requests
{
public class SlotOptionsRequest
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Requests
namespace Minecraft_Realms_Emulator.Shared.Requests
{
public class WorldCreateRequest
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class BackupDownloadResponse
{

View File

@ -0,0 +1,9 @@
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class BackupsResponse
{
public List<Backup> Backups { get; set; }
}
}

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class ErrorResponse
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class InviteList
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class LivePlayerListsResponse
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class MinecraftPlayerInfo
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class MinecraftServerQueryRepsonse
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class NewsResponse
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class NotificationsResponse
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class OpsResponse
{

View File

@ -1,6 +1,4 @@
using Minecraft_Realms_Emulator.Entities;
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class ServersResponse
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Shared.Requests;
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class SlotOptionsResponse : SlotOptionsRequest
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class SlotResponse
{

View File

@ -1,4 +1,4 @@
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class SubscriptionResponse
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Responses
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class TemplatesResponse
{

View File

@ -1,6 +1,6 @@
using Minecraft_Realms_Emulator.Responses;
using Minecraft_Realms_Emulator.Shared.Entities;
namespace Minecraft_Realms_Emulator.Entities
namespace Minecraft_Realms_Emulator.Shared.Responses
{
public class WorldResponse : World
{

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc.Testing;
using Minecraft_Realms_Emulator.Entities;
using Minecraft_Realms_Emulator.Requests;
using Minecraft_Realms_Emulator.Shared.Requests;
using Minecraft_Realms_Emulator.Shared.Responses;
using Newtonsoft.Json;
using System.Text;