Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
add controller
Browse files Browse the repository at this point in the history
  • Loading branch information
clement128 committed Aug 20, 2020
1 parent ad714cd commit d6f4171
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Modules/SecurityTest/Controllers/MyController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Mvc;

namespace SecurityTest.Controllers
{
[Area("ActivityLog")]
[Route("api/securitytest")]
public class MyController : Controller
{
private readonly Class1 myClass;

public MyController(Class1 myClass)
{
this.myClass = myClass;
}

[HttpGet("test")]
public IActionResult Test(string title, string contents, string user)
{
myClass.Method1(title, contents, user);
return Ok("ok");
}
}
}
3 changes: 3 additions & 0 deletions src/Modules/SecurityTest/SecurityTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.7" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

0 comments on commit d6f4171

Please sign in to comment.