ich kotz gleich

This commit is contained in:
2025-08-22 09:20:31 +02:00
parent 8bf8f5fb19
commit abe438ba0d
4 changed files with 7 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ RUN mkdir -p /app/persistence /app/wwwroot/downloads/sqlite /app/logs
# Volumes
VOLUME ["/app/persistence", "/app/wwwroot/downloads/sqlite", "/app/logs"]
# Expose Port 80 und 443 (HTTP + HTTPS)
# Expose Port 5000
EXPOSE 5000
ENV ASPNETCORE_URLS=http://*:5000
ENV ASPNETCORE_ENVIRONMENT=Development

View File

@@ -6,7 +6,7 @@ using Watcher.Models;
using Watcher.ViewModels;
[Authorize]
[Route("Server")]
[Route("[controller]")]
public class ServerController : Controller
{
private readonly AppDbContext _context;
@@ -79,7 +79,7 @@ public class ServerController : Controller
}
// GET: Server/Edit/5
[HttpGet("EditServer/[id]")]
public async Task<IActionResult> EditServer(int id)
{
var server = await _context.Servers.FindAsync(id);
@@ -96,7 +96,7 @@ public class ServerController : Controller
}
// POST: Server/Edit/5
[HttpPost]
[HttpPost("EditServer/{id}")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> EditServer(int id, EditServerViewModel vm)
{
@@ -130,7 +130,7 @@ public class ServerController : Controller
}
// GET: Server/Details/5
[HttpGet("Details")]
[HttpGet("Details/{id}")]
public async Task<IActionResult> Details(int id)
{

View File

@@ -10,6 +10,7 @@
</h1>
<form asp-action="AddServer" asp-controller="Server" method="post">
@Html.AntiForgeryToken()
<div class="mb-3">
<label asp-for="Name" class="form-label"><i class="bi bi-terminal me-1"></i>Servername</label>
<input asp-for="Name" class="form-control" placeholder="z.B. Webserver-01" />

View File

@@ -1,3 +1,4 @@
@{
Layout = "_Layout";
}
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers