Add project files.

This commit is contained in:
Tech Garage 2023-03-03 23:24:18 +03:30
commit b2325a46ef
1351 changed files with 48136 additions and 0 deletions

View file

@ -0,0 +1,34 @@
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace MTWireGuard.Models.Responses
{
public class ToastResult : IActionResult
{
private class Toast
{
public string Title { get; set; }
public string Body { get; set; }
public string Background { get; set; }
}
private readonly Toast _result;
public ToastResult(string title, string body, string background)
{
_result = new()
{
Title = title,
Body = body,
Background = background
};
}
public async Task ExecuteResultAsync(ActionContext context)
{
var objectResult = new ObjectResult(_result);
await objectResult.ExecuteResultAsync(context);
}
}
}