diff options
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.Portal/Controllers')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs index b913ec6d8..dff8a140e 100644 --- a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs +++ b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs @@ -15,6 +15,7 @@ using Tango.Portal.Models; using Tango.Portal.Utils; using Tango.Portal.ViewModels; using System.Data.Entity; +using Newtonsoft.Json; namespace Tango.Portal.Controllers { @@ -167,6 +168,13 @@ namespace Tango.Portal.Controllers } } + public ActionResult AI() + { + if (!SessionUser.IsTwineUser) return RedirectToAction(nameof(Login)); + String session = SimpleCryptoHelper.Encrypt(JsonConvert.SerializeObject(new { UserName = SessionUser.Name, Expires = DateTime.UtcNow.AddHours(1) })); + return new RedirectResult($"https://ai.twine-srv.com?session={session}"); + } + public ActionResult Docs() { DocsVM vm = new DocsVM(SessionUser); |
