forked from adam/discord-bot-shtik
Compare commits
No commits in common. "e364b47c0fcbc9a5468300904bce74119e8bc6f6" and "2f7bc2c0eaff14a0fa2a38903058ebbc1ad42858" have entirely different histories.
e364b47c0f
...
2f7bc2c0ea
@ -13,7 +13,6 @@ builder.Services.Configure<RazorViewEngineOptions>(o => {
|
||||
o.ViewLocationFormats.Add("/WebInterface/Views/{1}/{0}" + RazorViewEngine.ViewExtension);
|
||||
o.ViewLocationFormats.Add("/WebInterface/Views/Shared/{0}" + RazorViewEngine.ViewExtension);
|
||||
});
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@ -30,11 +29,5 @@ app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.UseSwagger();
|
||||
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "api");
|
||||
});
|
||||
|
||||
app.Run();
|
||||
|
@ -1,35 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using vassago.Models;
|
||||
|
||||
namespace vassago.Controllers.api;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ChannelsController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<ChannelsController> _logger;
|
||||
private readonly ChattingContext _db;
|
||||
|
||||
public ChannelsController(ILogger<ChannelsController> logger, ChattingContext db)
|
||||
{
|
||||
_logger = logger;
|
||||
_db = db;
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[Produces("application/json")]
|
||||
public Channel Get(Guid id)
|
||||
{
|
||||
return _db.Find<Channel>(id);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/json")]
|
||||
public Channel Post([FromBody] Channel channel)
|
||||
{
|
||||
// Write logic to insert employee data
|
||||
return new Channel();
|
||||
}
|
||||
}
|
@ -14,11 +14,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Lewdness Filter Level</th>
|
||||
<td>@(Model.LewdnessFilterLevel?.ToString() ?? "inherited")</td>
|
||||
<td>@Model.LewdnessFilterLevel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Links Allowed</th>
|
||||
<td>@(Model.LinksAllowed?.ToString() ?? "unknown")</td>
|
||||
<td>@Model.LinksAllowed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Lineage summary</th>
|
||||
@ -30,11 +30,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">max message length</th>
|
||||
<td>@(Model.MaxTextChars?.ToString() ?? "inherited")</td>
|
||||
<td>@Model.MaxTextChars</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Meanness Filter Level</th>
|
||||
<td>@(Model.MeannessFilterLevel?.ToString() ?? "inherited")</td>
|
||||
<td>@Model.MeannessFilterLevel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Messages (count)</th>
|
||||
@ -46,15 +46,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Reactions Possible</th>
|
||||
<td>@(Model.ReactionsPossible?.ToString() ?? "inherited")</td>
|
||||
<td>@Model.ReactionsPossible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Sub Channels</th>
|
||||
<td>@(Model.SubChannels?.Count ?? 0)</td>
|
||||
<td>@Model.SubChannels</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Users</th>
|
||||
<td>@(Model.Users?.Count ?? 0)</td>
|
||||
<td>@Model.Users</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -19,9 +19,6 @@
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
|
||||
<PackageReference Include="QRCoder" Version="1.4.2" />
|
||||
<PackageReference Include="RestSharp" Version="110.2.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.6.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.6.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
||||
<PackageReference Include="TwitchLib" Version="3.5.3" />
|
||||
<PackageReference Include="youtubedlsharp" Version="0.3.1" />
|
||||
</ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user