-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
#endif | ||
.AddConfiguration(builder.Configuration)); | ||
|
||
|
||
builder.Services.AddScoped<IPosts, Posts>(); | ||
builder.Services.AddScoped<IStorage, Storage>(); | ||
builder.Services.AddScoped<IUsers, Users>(); | ||
|
@@ -119,8 +118,8 @@ await db.Database.ExecuteSqlInterpolatedAsync( | |
Title = "Mumble API", | ||
Description = | ||
"API for 'mumble'. A simple messaging/twitter like API for the CAS Frontend Engineering Advanced.", | ||
Contact = new() {Name = "smartive AG", Email = "[email protected]", Url = new("https://smartive.ch"),}, | ||
License = new() {Name = "Apache 2.0", Url = new("https://www.apache.org/licenses/LICENSE-2.0"),}, | ||
Contact = new() { Name = "smartive AG", Email = "[email protected]", Url = new("https://smartive.ch"), }, | ||
License = new() { Name = "Apache 2.0", Url = new("https://www.apache.org/licenses/LICENSE-2.0"), }, | ||
}); | ||
o.AddSecurityDefinition(ZitadelDefaults.AuthenticationScheme, new() | ||
|
@@ -149,7 +148,7 @@ await db.Database.ExecuteSqlInterpolatedAsync( | |
Description = "Universally Unique Lexicographically Sortable Identifier", | ||
Type = "string", | ||
Example = new OpenApiString("01GEESHPQQ4NJKNZJN9AKWQW6G"), | ||
ExternalDocs = new() {Description = "ULID Specification", Url = new("https://github.com/ulid/spec"),}, | ||
ExternalDocs = new() { Description = "ULID Specification", Url = new("https://github.com/ulid/spec"), }, | ||
}); | ||
o.OperationFilter<InternalServerErrorResponseFilter>(); | ||
|
@@ -181,7 +180,7 @@ await db.Database.ExecuteSqlInterpolatedAsync( | |
new() | ||
{ | ||
ForwardedHeaders = ForwardedHeaders.XForwardedProto, | ||
KnownNetworks = {new IPNetwork(IPAddress.Parse("0.0.0.0"), 0)}, | ||
KnownNetworks = { new IPNetwork(IPAddress.Parse("0.0.0.0"), 0) }, | ||
}); | ||
app.UseHsts(); | ||
} | ||
|
@@ -202,7 +201,7 @@ await db.Database.ExecuteSqlInterpolatedAsync( | |
o.RoutePrefix = string.Empty; | ||
o.OAuthConfigObject = new() | ||
{ | ||
Scopes = new List<string> {"openid", "profile", "email"}, | ||
Scopes = new List<string> { "openid", "profile", "email" }, | ||
ClientId = config.Swagger.ClientId, | ||
UsePkceWithAuthorizationCodeGrant = true, | ||
}; | ||
|