mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-16 09:24:59 +03:00
Refactor UI config access and clean up code
Use ConfigTextManager instance methods for window sizes and grid heights in both desktop clients. Standardize formatting and remove redundant imports and casts across the Web API and tests.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using ServiceLib.Enums;
|
||||
using ServiceLib.Models.Entities;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using v2rayN.WebAPI.Contracts;
|
||||
using v2rayN.WebAPI.Security;
|
||||
@@ -206,7 +204,7 @@ public static class WebApiEndpoints
|
||||
{
|
||||
var (result, filePath) = await runtime.CreateBackupArchiveAsync();
|
||||
return result.Success && filePath is not null
|
||||
? (IResult)new DeleteAfterFileResult(filePath)
|
||||
? new DeleteAfterFileResult(filePath)
|
||||
: ApiReplies.Operation(result);
|
||||
});
|
||||
app.MapPost("/api/backup/restore", async (IFormFile file, V2rayRuntime runtime, CancellationToken cancellationToken) =>
|
||||
|
||||
Reference in New Issue
Block a user