Code formatiert
This commit is contained in:
@@ -34,7 +34,7 @@ namespace ReallifeGamemode.DataService.Controllers
|
||||
|
||||
string token = tokenGenerator.GenerateUserToken(user);
|
||||
|
||||
if(string.IsNullOrEmpty(token))
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return Unauthorized();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace ReallifeGamemode.DataService.Controllers
|
||||
|
||||
List<string> locations = new List<string>();
|
||||
|
||||
foreach(var location in list)
|
||||
foreach (var location in list)
|
||||
{
|
||||
string description = location.Description;
|
||||
description = Regex.Replace(description, @"<[^>]*(>|$)", string.Empty);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ReallifeGamemode.DataService.Controllers
|
||||
{
|
||||
User user = dbContext.Users.Where(u => u.Id == UserId).FirstOrDefault();
|
||||
|
||||
if(user == null)
|
||||
if (user == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ReallifeGamemode.DataService.Logic
|
||||
|
||||
public string GenerateUserToken(User user)
|
||||
{
|
||||
if(user == null)
|
||||
if (user == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ReallifeGamemode.DataService.Logic
|
||||
{
|
||||
Type[] types = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.IsSubclassOf(typeof(LogicBase)) && !t.IsAbstract).ToArray();
|
||||
|
||||
foreach(Type type in types)
|
||||
foreach (Type type in types)
|
||||
{
|
||||
services = services.AddScoped(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user