mirror of
https://github.com/NicolasConstant/BirdsiteLive
synced 2025-06-05 21:49:16 +02:00
testing user controller
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
23
src/BirdsiteLive/Controllers/UserController.cs
Normal file
23
src/BirdsiteLive/Controllers/UserController.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BirdsiteLive.Controllers
|
||||||
|
{
|
||||||
|
public class UserController : Controller
|
||||||
|
{
|
||||||
|
[Route("/user")]
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
var r = Request.Headers["Accept"].First();
|
||||||
|
|
||||||
|
if(r.Contains("application/activity+json"))
|
||||||
|
return Json(new { test = "test" });
|
||||||
|
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
src/BirdsiteLive/Views/User/Index.cshtml
Normal file
7
src/BirdsiteLive/Views/User/Index.cshtml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "User";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>User</h1>
|
||||||
|
|
Reference in New Issue
Block a user