Added tooling
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
public static class General
|
||||
{
|
||||
public static string Clean(this string input) => Patterns.SpaceRegex().Replace(input, string.Empty);
|
||||
|
||||
public static string ToJson<TValue>(this TValue obj) where TValue : class => JsonSerializer.Serialize(obj);
|
||||
|
||||
public static TValue FromJson<TValue>(this string json) where TValue : class => JsonSerializer.Deserialize<TValue>(json)!;
|
||||
@@ -32,6 +34,6 @@ public static class General
|
||||
{
|
||||
Detail = string.Join(',', errors.Select(e => e.Message)),
|
||||
Status = StatusCodes.Status400BadRequest,
|
||||
Title = errors[0]?.Message,
|
||||
Title = "Error",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user