Merged Models into Server as Server.Models
This commit is contained in:
@@ -4,10 +4,10 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Models;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
using System.Reflection.Metadata.Ecma335;
|
||||||
|
using Server.Models;
|
||||||
|
|
||||||
namespace Client;
|
namespace Client;
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Models
|
|
||||||
{
|
|
||||||
public class SearchdomainListResults
|
|
||||||
{
|
|
||||||
[JsonPropertyName("Searchdomains")] // Otherwise the api returns {"searchdomains": [...]} and the client requires {"Searchdomains": [...]}
|
|
||||||
public required List<string> Searchdomains { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SearchdomainCreateResults
|
|
||||||
{
|
|
||||||
[JsonPropertyName("Success")]
|
|
||||||
public required bool Success { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("Id")]
|
|
||||||
public int? Id { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SearchdomainUpdateResults
|
|
||||||
{
|
|
||||||
[JsonPropertyName("Success")]
|
|
||||||
public required bool Success { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SearchdomainDeleteResults
|
|
||||||
{
|
|
||||||
[JsonPropertyName("Success")]
|
|
||||||
public required bool Success { get; set; }
|
|
||||||
[JsonPropertyName("DeletedEntities")]
|
|
||||||
public required int DeletedEntities { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Models;
|
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
using Server.Models;
|
||||||
namespace Server.Controllers;
|
namespace Server.Controllers;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Models;
|
using Server.Models;
|
||||||
|
|
||||||
namespace Server.Controllers;
|
namespace Server.Controllers;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Models;
|
namespace Server.Models;
|
||||||
|
|
||||||
|
|
||||||
public class EntityQueryResults
|
public class EntityQueryResults
|
||||||
32
src/Server/Models/SearchdomainResults.cs
Normal file
32
src/Server/Models/SearchdomainResults.cs
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Server.Models;
|
||||||
|
|
||||||
|
public class SearchdomainListResults
|
||||||
|
{
|
||||||
|
[JsonPropertyName("Searchdomains")] // Otherwise the api returns {"searchdomains": [...]} and the client requires {"Searchdomains": [...]}
|
||||||
|
public required List<string> Searchdomains { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SearchdomainCreateResults
|
||||||
|
{
|
||||||
|
[JsonPropertyName("Success")]
|
||||||
|
public required bool Success { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("Id")]
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SearchdomainUpdateResults
|
||||||
|
{
|
||||||
|
[JsonPropertyName("Success")]
|
||||||
|
public required bool Success { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SearchdomainDeleteResults
|
||||||
|
{
|
||||||
|
[JsonPropertyName("Success")]
|
||||||
|
public required bool Success { get; set; }
|
||||||
|
[JsonPropertyName("DeletedEntities")]
|
||||||
|
public required int DeletedEntities { get; set; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user