initial commit

This commit is contained in:
2026-08-04 14:41:21 +03:00
parent 3cb8fcde60
commit 1a1d6186d8
101 changed files with 23239 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using Microsoft.AspNetCore.Mvc;
using Library.Models;
namespace Library;
public class PageController : AbstractController
{
protected PageController( ILogger logger , IConfiguration configuration )
: base( logger , configuration )
{
}
protected IActionResult View( BasePageModel page_model )
{
page_model.UserData = GetUserData( );
return base.View( page_model );
}
protected IActionResult View( string view_name , BasePageModel page_model)
{
page_model.UserData = GetUserData( );
return base.View( view_name , page_model );
}
protected override void OnInvalidLogin( )
{
throw new ErrorException( "Access denied." );
}
protected override void OnInvalidAdminLogin( )
{
throw new ErrorException( "Access denied." );
}
protected IActionResult RawText( string text )
{
return new ContentResult( )
{
ContentType = System.Net.Mime.MediaTypeNames.Text.Plain ,
Content = text
};
}
}