Skip to content

Frontend Overhaul + Admin mode#3

Open
NiklasKy wants to merge 3 commits into
masterfrom
feature/Overhaul
Open

Frontend Overhaul + Admin mode#3
NiklasKy wants to merge 3 commits into
masterfrom
feature/Overhaul

Conversation

@NiklasKy
Copy link
Copy Markdown
Collaborator

this pull request integrates my frontend overhaul plus a admin mode for all boards.

Further changes will be made to the documentation regarding languange change

@NiklasKy NiklasKy requested a review from maxider October 10, 2025 14:09
@NiklasKy NiklasKy self-assigned this Oct 10, 2025
@NiklasKy NiklasKy marked this pull request as ready for review October 27, 2025 18:40
Copy link
Copy Markdown
Owner

@maxider maxider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review the frontend later

using System.Security.Cryptography;
using System.Text;

namespace FunWithEF.Controllers;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespace should be 'LogNineBackend.Controllers'. This is also wrong in the 'TeamsController'

}

private bool VerifyAdminPassword(string? password) {
if (string.IsNullOrWhiteSpace(password))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant.

public int Id { get; set; }

[Required]
[StringLength(200, MinimumLength = 1)]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default state contradicts the default. Instead set no default.

public Team? Target { get; set; }

[Required]
[StringLength(200, MinimumLength = 1)]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default contradicts the minimum

public String Name { get; set; }

[Required]
[StringLength(100, MinimumLength = 1)]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default contradics minimum


[Required]
[StringLength(100, MinimumLength = 1)]
public string Name { get; set; } = string.Empty;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default contradicts minimum


// Configure CORS with proper settings
var allowedOrigins = builder.Configuration.GetSection("AllowedOrigins").Get<string[]>()
?? new[] { "http://localhost:8081", "http://localhost:5173" };
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull this from the app settings instead of hardcoding it.

var maxRequestSizeKB = builder.Configuration.GetValue<int>("MaxRequestSizeKB", 1024); // Default 1MB
app.Use((context, next) => {
if (context.Request.ContentLength > 10 * 1024)
if (context.Request.ContentLength > maxRequestSizeKB * 1024)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the * 1024 in this line.

if (context.Request.ContentLength > maxRequestSizeKB * 1024)
{
logger?.LogWarning("Request rejected: Content length {ContentLength} exceeds limit {Limit}",
context.Request.ContentLength, maxRequestSizeKB * 1024);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the * 1024 in this line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants