mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-02 22:22:28 +00:00
Code cleanup
This commit is contained in:
parent
cb30157047
commit
5fcd8a00a6
11 changed files with 7 additions and 29 deletions
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using ProjectLighthouse.Serialization;
|
||||
using ProjectLighthouse.Types;
|
||||
|
||||
namespace ProjectLighthouse.Controllers {
|
||||
|
@ -14,7 +13,7 @@ namespace ProjectLighthouse.Controllers {
|
|||
|
||||
[HttpGet("t_conf")]
|
||||
[Produces("text/json")]
|
||||
public IActionResult TConf() {
|
||||
public IActionResult Conf() {
|
||||
return this.Ok("[{\"StatusCode\":200}]");
|
||||
}
|
||||
|
||||
|
@ -27,8 +26,8 @@ namespace ProjectLighthouse.Controllers {
|
|||
[Produces("text/xml")]
|
||||
public IActionResult PrivacySettings() {
|
||||
PrivacySettings ps = new() {
|
||||
LevelVisibility = "unset",
|
||||
ProfileVisibility = "unset"
|
||||
LevelVisibility = "all",
|
||||
ProfileVisibility = "all"
|
||||
};
|
||||
|
||||
return this.Ok(ps.Serialize());
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using ProjectLighthouse.Types;
|
||||
|
@ -11,9 +10,9 @@ namespace ProjectLighthouse.Controllers {
|
|||
[HttpGet]
|
||||
[HttpPost]
|
||||
public IActionResult Post() {
|
||||
if(!this.Request.Query.TryGetValue("titleID", out StringValues titleValues)) {
|
||||
if(!this.Request.Query.TryGetValue("titleID", out StringValues _)) {
|
||||
this.BadRequest();
|
||||
};
|
||||
}
|
||||
|
||||
// string titleId = titleValues[0];
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -34,7 +33,7 @@ namespace ProjectLighthouse.Controllers {
|
|||
|
||||
[HttpPost("showModerated")]
|
||||
public IActionResult ShowModerated() {
|
||||
return this.Ok("<resources/>");
|
||||
return this.Ok(LbpSerializer.BlankElement("resources"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ProjectLighthouse.Types;
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ProjectLighthouse.Types;
|
||||
|
||||
namespace ProjectLighthouse {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ProjectLighthouse.Serialization {
|
||||
/// <summary>
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using ProjectLighthouse.Serialization;
|
||||
|
||||
namespace ProjectLighthouse {
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace ProjectLighthouse.Types {
|
|||
get {
|
||||
if(dbConnectionString == null) {
|
||||
return dbConnectionString = Environment.GetEnvironmentVariable("LIGHTHOUSE_DB_CONNECTION_STRING") ?? "";
|
||||
};
|
||||
}
|
||||
return dbConnectionString;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue