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