chore: initial commit of TaskTracker project
Existing ASP.NET API with vanilla JS SPA, WindowWatcher, Chrome extension, and MCP server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
20
TaskTracker.Core/DTOs/ApiResponse.cs
Normal file
20
TaskTracker.Core/DTOs/ApiResponse.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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 };
|
||||
}
|
||||
Reference in New Issue
Block a user