testing user controller
This commit is contained in:
parent
75b6f32f87
commit
b7c73778b2
3 changed files with 32 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
@ -8,6 +8,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
|
||||
</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 a new issue