Add project files.
This commit is contained in:
29
HanyadikHetVan/Controllers/TestController.cs
Normal file
29
HanyadikHetVan/Controllers/TestController.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HanyadikHetVan.Controllers
|
||||
{
|
||||
[Route("api/test")]
|
||||
[ApiController]
|
||||
public class TestController : ControllerBase
|
||||
{
|
||||
[HttpGet("unprotected")]
|
||||
public string Unprotected()
|
||||
{
|
||||
|
||||
return "Geci";
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet("protected")]
|
||||
public string Protected()
|
||||
{
|
||||
|
||||
return "Gecijo";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user