Large refactor and project restructuring
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace PluralKit.API.Controllers
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[Route("a")]
|
||||
|
@@ -1,12 +1,12 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API.Controllers
|
||||
namespace PluralKit.API
|
||||
{
|
||||
[ApiController]
|
||||
[Route("m")]
|
||||
@@ -48,9 +48,9 @@ namespace PluralKit.API.Controllers
|
||||
var member = await _data.CreateMember(system, properties.Value<string>("name"));
|
||||
try
|
||||
{
|
||||
member.Apply(properties);
|
||||
member.ApplyJson(properties);
|
||||
}
|
||||
catch (PKParseError e)
|
||||
catch (JsonModelParseError e)
|
||||
{
|
||||
return BadRequest(e.Message);
|
||||
}
|
||||
@@ -70,9 +70,9 @@ namespace PluralKit.API.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
member.Apply(changes);
|
||||
member.ApplyJson(changes);
|
||||
}
|
||||
catch (PKParseError e)
|
||||
catch (JsonModelParseError e)
|
||||
{
|
||||
return BadRequest(e.Message);
|
||||
}
|
||||
|
@@ -1,11 +1,15 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using NodaTime;
|
||||
|
||||
namespace PluralKit.API.Controllers
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API
|
||||
{
|
||||
public struct MessageReturn
|
||||
{
|
||||
|
@@ -1,17 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dapper;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using NodaTime;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
namespace PluralKit.API.Controllers
|
||||
namespace PluralKit.API
|
||||
{
|
||||
public struct SwitchesReturn
|
||||
{
|
||||
@@ -130,9 +133,9 @@ namespace PluralKit.API.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
system.Apply(changes);
|
||||
system.ApplyJson(changes);
|
||||
}
|
||||
catch (PKParseError e)
|
||||
catch (JsonModelParseError e)
|
||||
{
|
||||
return BadRequest(e.Message);
|
||||
}
|
||||
|
Reference in New Issue
Block a user