Initial commit

This commit is contained in:
2026-06-04 06:24:56 +02:00
commit 282f4864c4
111 changed files with 8083 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using MealPlan.Api.DTOs.Auth;
namespace MealPlan.Api.Services;
/// <summary>Outcome of an auth operation. Avoids throwing for expected failures (bad credentials, etc.).</summary>
public class AuthResult
{
public bool Succeeded { get; private init; }
public string? Error { get; private init; }
public TokenResponseDto? Tokens { get; private init; }
public static AuthResult Success(TokenResponseDto tokens) =>
new() { Succeeded = true, Tokens = tokens };
public static AuthResult Fail(string error) =>
new() { Succeeded = false, Error = error };
}