Upgraded mooncore versions. Cleaned up code, especially startup code. Changed versions

This commit is contained in:
2025-10-05 16:07:27 +00:00
parent d2ef59d171
commit 9ab69ffef5
43 changed files with 429 additions and 632 deletions

View File

@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MoonCore.Common;
using MoonCore.Extended.Abstractions;
using MoonCore.Models;
using Moonlight.ApiServer.Database.Entities;
using Moonlight.ApiServer.Mappers;
using Moonlight.ApiServer.Services;
@@ -26,7 +26,7 @@ public class ApiKeysController : Controller
[HttpGet]
[Authorize(Policy = "permissions:admin.apikeys.get")]
public async Task<ActionResult<ICountedData<ApiKeyResponse>>> GetAsync(
public async Task<ActionResult<CountedData<ApiKeyResponse>>> GetAsync(
[FromQuery] int startIndex,
[FromQuery] int count,
[FromQuery] string? orderBy,

View File

@@ -1,11 +1,8 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MoonCore.Exceptions;
using MoonCore.Common;
using MoonCore.Extended.Abstractions;
using MoonCore.Extended.Models;
using MoonCore.Models;
using Moonlight.ApiServer.Database.Entities;
using Moonlight.ApiServer.Mappers;
using Moonlight.Shared.Http.Requests.Admin.Sys.Theme;
@@ -26,7 +23,7 @@ public class ThemesController : Controller
[HttpGet]
[Authorize(Policy = "permissions:admin.system.customisation.themes.read")]
public async Task<ActionResult<ICountedData<ThemeResponse>>> GetAsync(
public async Task<ActionResult<CountedData<ThemeResponse>>> GetAsync(
[FromQuery] int startIndex,
[FromQuery] int count,
[FromQuery] string? orderBy,

View File

@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Moonlight.ApiServer.Services;
using Moonlight.Shared.Http.Requests.Admin.Sys;

View File

@@ -2,10 +2,9 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using MoonCore.Exceptions;
using MoonCore.Common;
using MoonCore.Extended.Abstractions;
using MoonCore.Extended.Helpers;
using MoonCore.Models;
using Moonlight.ApiServer.Database.Entities;
using Moonlight.ApiServer.Services;
using Moonlight.ApiServer.Mappers;
@@ -27,7 +26,7 @@ public class UsersController : Controller
[HttpGet]
[Authorize(Policy = "permissions:admin.users.get")]
public async Task<ActionResult<ICountedData<UserResponse>>> GetAsync(
public async Task<ActionResult<CountedData<UserResponse>>> GetAsync(
[FromQuery] int startIndex,
[FromQuery] int count,
[FromQuery] string? orderBy,

View File

@@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Moonlight.ApiServer.Configuration;
using Moonlight.ApiServer.Implementations.LocalAuth;
using Moonlight.ApiServer.Interfaces;
using Moonlight.Shared.Http.Responses.Auth;

View File

@@ -1,5 +1,4 @@
@using Moonlight.ApiServer.Database.Entities
@using Moonlight.Shared.Misc
<!DOCTYPE html>
<html lang="en" class="bg-background text-base-content font-inter">

View File

@@ -1,11 +1,9 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using MoonCore.Exceptions;
using MoonCore.Extended.Abstractions;
using MoonCore.Extended.Helpers;
using MoonCore.Helpers;