Skip to content

Commit c904060

Browse files
Complete EditorConfig.
1 parent 73c5b76 commit c904060

File tree

50 files changed

+101
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+101
-145
lines changed

src/SwiftLink.Application/Behaviors/ValidationBehavior.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using FluentValidation;
2-
using MediatR;
32
using SwiftLink.Application.Common;
43
using SwiftLink.Application.Common.Exceptions;
54

@@ -25,9 +24,6 @@ public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TRe
2524
.Distinct()
2625
.ToList();
2726

28-
if (errors.Count != 0)
29-
throw new BusinessValidationException(errors);
30-
31-
return await next();
27+
return errors.Count != 0 ? throw new BusinessValidationException(errors) : await next();
3228
}
33-
}
29+
}

src/SwiftLink.Application/Common/CommonMessages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ public static class Database
77
public static readonly Error InsertFailed = Error.Failure("Database.Failed", "Insert into db is failed :(");
88
public static readonly Error UpdateFailed = Error.Failure("Database.Failed", "Update record in db is failed :(");
99
}
10-
}
10+
}

src/SwiftLink.Application/Common/Exceptions/BusinessValidationException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
public class BusinessValidationException(List<ValidationError> errors) : Exception
44
{
55
public readonly List<ValidationError> Errors = errors;
6-
}
6+
}

src/SwiftLink.Application/Common/HashBasedShortCodeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ private static string GetHash(string input)
2424
var hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes(input));
2525
return BitConverter.ToString(hashBytes).Replace("-", string.Empty)[..COUNT_OF_HASH_SPLITTER];
2626
}
27-
}
27+
}

src/SwiftLink.Application/Common/Interfaces/IApplicationDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ public interface IApplicationDbContext
1515
public Task<Result> SaveChangesAsync(CancellationToken cancellationToken);
1616

1717
DbSet<TEntity> Set<TEntity>() where TEntity : class;
18-
}
18+
}

src/SwiftLink.Application/Common/Interfaces/ICacheProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ public interface ICacheProvider
3737
/// <param name="key">An object identifying the requested entry.</param>
3838
/// <returns>The located value or default url</returns>
3939
Task<string> Get(string key);
40-
}
40+
}

src/SwiftLink.Application/Common/Interfaces/ISharedContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ public interface ISharedContext
1818
/// <param name="key">Key</param>
1919
/// <param name="value">Value</param>
2020
void Set(string key, object value);
21-
}
21+
}

src/SwiftLink.Application/Common/Interfaces/IShortCodeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ public interface IShortCodeGenerator
1111
/// <param name="originalUrl">Url which we want to map to a short code.</param>
1212
/// <returns>16 charachters.</returns>
1313
string Generate(string originalUrl);
14-
}
14+
}

src/SwiftLink.Application/Common/Security/AuthorizeAttribute.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/SwiftLink.Application/Common/SharedContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ public object Get(string key)
1212

1313
public void Set(string key, object value)
1414
=> Add(key, value);
15-
}
15+
}

0 commit comments

Comments
 (0)