全部加入JWT驗證

This commit is contained in:
leo 2024-02-09 16:44:45 +08:00
parent 51f4bafb9f
commit 56322e39dc
16 changed files with 32 additions and 0 deletions

View File

@ -6,12 +6,14 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_space_algorithmController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,11 +8,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_cam_ptzController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Authorization;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
@ -12,6 +13,7 @@ namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_cam_ptz_car_num_checkController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -6,12 +6,14 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Authorization;
using WebApi_data_value.Services;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_cam_ptz_passController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_cam_ptz_violationController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,11 +8,13 @@ using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_historyController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,12 +8,14 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using WebApi_data_value.ViewModel;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_instantController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_lcd_instandController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,12 +7,14 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
using WebApi_data_value.ViewModel;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_roiController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_roi_car_num_checkController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_roi_passController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_roi_violationController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,11 +8,13 @@ using Microsoft.EntityFrameworkCore;
using MySqlX.XDevAPI.Common;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_total_tableController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -7,11 +7,13 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Parking_spaces_violation_total_tableController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,11 +8,13 @@ using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Violation_car_tableController : ControllerBase
{
private readonly SqlContext _context;

View File

@ -8,12 +8,14 @@ using Microsoft.EntityFrameworkCore;
using WebApi_data_value.Models;
using WebApi_data_value.Services;
using WebApi_data_value.ViewModel;
using WebApi_data_value.Authorization;
namespace WebApi_data_value.Controllers
{
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class Yuntech_in_car_tableController : ControllerBase
{
private readonly SqlContext _context;