Existing ASP.NET API with vanilla JS SPA, WindowWatcher, Chrome extension, and MCP server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
626 B
C#
21 lines
626 B
C#
namespace TaskTracker.Core.DTOs;
|
|
|
|
public class ApiResponse<T>
|
|
{
|
|
public bool Success { get; set; }
|
|
public T? Data { get; set; }
|
|
public string? Error { get; set; }
|
|
|
|
public static ApiResponse<T> Ok(T data) => new() { Success = true, Data = data };
|
|
public static ApiResponse<T> Fail(string error) => new() { Success = false, Error = error };
|
|
}
|
|
|
|
public class ApiResponse
|
|
{
|
|
public bool Success { get; set; }
|
|
public string? Error { get; set; }
|
|
|
|
public static ApiResponse Ok() => new() { Success = true };
|
|
public static ApiResponse Fail(string error) => new() { Success = false, Error = error };
|
|
}
|