mirror of
https://github.com/Ikatono/ComiServ.git
synced 2025-10-28 20:45:35 -05:00
cleaned up a few comments
This commit is contained in:
@@ -6,7 +6,7 @@ namespace ComiServ.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// This was originally made to remove Entity types that were being added to the Swagger schema.
|
||||
/// I found that there was a bug a `ProducesResponseTypeAttribute` that caused it, and this is
|
||||
/// I found that there was a bug in `ProducesResponseTypeAttribute` that caused it, and this is
|
||||
/// no longer necessary. I changed Apply to a nop but am keeping this around as an example and
|
||||
/// in case I actually need something like this in the future.
|
||||
/// </summary>
|
||||
@@ -18,7 +18,9 @@ namespace ComiServ.Entities
|
||||
nameof(ComicAuthor),
|
||||
nameof(ComicTag),
|
||||
nameof(Cover),
|
||||
nameof(Tag)
|
||||
nameof(Tag),
|
||||
nameof(User),
|
||||
nameof(UserType)
|
||||
];
|
||||
public void Apply(OpenApiSchema schema, SchemaFilterContext context)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,6 @@ var app = builder.Build();
|
||||
app.UseHttpLogging();
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
@@ -107,7 +106,7 @@ app.UseHttpsRedirection();
|
||||
|
||||
//ensures that the user is authenticated (if auth is provided) but does not restrict access to any routes
|
||||
app.UseBasicAuthentication([]);
|
||||
//require user or admin account to access any comic resource (uses the authentication
|
||||
//require user or admin account to access any comic resource
|
||||
app.UseWhen(context => context.Request.Path.StartsWithSegments(ComicController.ROUTE), appBuilder =>
|
||||
{
|
||||
appBuilder.UseBasicAuthentication([UserTypeEnum.User, UserTypeEnum.Administrator]);
|
||||
|
||||
Reference in New Issue
Block a user