Little update around the controllers

This commit is contained in:
Sébastien André
2020-03-21 16:43:56 +01:00
parent c15ad54823
commit c85b036b7e
12 changed files with 24 additions and 29 deletions

View File

@@ -11,8 +11,6 @@ using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class AircraftController : Base
{
public AircraftController(IAircraftService aircraftService,

View File

@@ -1,6 +1,8 @@
using System;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using skydiveLogs_api.Model;
@@ -8,6 +10,9 @@ using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
public class Base : ControllerBase
{
public User ConnectedUser

View File

@@ -11,8 +11,6 @@ using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class DropZoneController : Base
{
public DropZoneController(IDropZoneService dropZoneService,

View File

@@ -11,8 +11,6 @@ using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class GearController : Base
{
public GearController(IGearService gearService,

View File

@@ -1,8 +1,6 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using AutoMapper;
@@ -10,14 +8,9 @@ using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
using System.Linq;
using System.Security.Claims;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
public class JumpController : Base
{
public JumpController(IJumpService jumpService,

View File

@@ -11,8 +11,6 @@ using skydiveLogs_api.Model;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class JumpTypeController : Base
{
public JumpTypeController(IJumpTypeService jumpTypeService,

View File

@@ -10,8 +10,6 @@ using skydiveLogs_api.DataContract;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class StatsController : Base
{
public StatsController(IStatsService statsService,

View File

@@ -5,6 +5,10 @@ using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using Microsoft.Extensions.Configuration;
using System.Linq;
using System;
using System.Text;
using System.Security.Claims;
using System.Collections.Generic;
using AutoMapper;
@@ -12,10 +16,6 @@ using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.DataContract;
using skydiveLogs_api.Model;
using System;
using System.Text;
using System.Security.Claims;
using System.Collections.Generic;
namespace skydiveLogs_api.Controllers
{

Binary file not shown.