變更名稱
This commit is contained in:
parent
1563577166
commit
a2ca6b3b7e
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Authorization;
|
namespace Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Method)]
|
[AttributeUsage(AttributeTargets.Method)]
|
||||||
public class AllowAnonymousAttribute : Attribute
|
public class AllowAnonymousAttribute : Attribute
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
namespace WebApi_data_value.Authorization;
|
namespace Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using WebApi_data_value.Entities;
|
using Parking_space_WebAPI.Entities;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
||||||
public class AuthorizeAttribute : Attribute, IAuthorizationFilter
|
public class AuthorizeAttribute : Attribute, IAuthorizationFilter
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace WebApi_data_value.Authorization;
|
namespace Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
public class JwtMiddleware
|
public class JwtMiddleware
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
namespace WebApi_data_value.Authorization;
|
namespace Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
using Microsoft.IdentityModel.Tokens;
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using WebApi_data_value.Entities;
|
using Parking_space_WebAPI.Entities;
|
||||||
using WebApi_data_value.Helpers;
|
using Parking_space_WebAPI.Helpers;
|
||||||
|
|
||||||
public interface IJwtUtils
|
public interface IJwtUtils
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,14 +5,14 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -6,11 +6,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,12 +5,12 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -6,12 +6,12 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,12 +5,12 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -6,11 +6,11 @@ using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using MySqlX.XDevAPI.Common;
|
using MySqlX.XDevAPI.Common;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -6,9 +6,9 @@ using Mysqlx;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NuGet.Common;
|
using NuGet.Common;
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
|
|
@ -5,12 +5,12 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
|
|
@ -5,12 +5,12 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
using WebApi_data_value.ViewModel;
|
using Parking_space_WebAPI.ViewModel;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
|
|
||||||
namespace WebApi_data_value.Controllers
|
namespace Parking_space_WebAPI.Controllers
|
||||||
{
|
{
|
||||||
|
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
|
|
|
@ -8,17 +8,17 @@ EXPOSE 443
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["WebApi_data_value/WebApi_data_value.csproj", "WebApi_data_value/"]
|
COPY ["Parking_space_WebAPI/Parking_space_WebAPI.csproj", "Parking_space_WebAPI/"]
|
||||||
RUN dotnet restore "./WebApi_data_value/./WebApi_data_value.csproj"
|
RUN dotnet restore "./Parking_space_WebAPI/./Parking_space_WebAPI.csproj"
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/WebApi_data_value"
|
WORKDIR "/src/Parking_space_WebAPI"
|
||||||
RUN dotnet build "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
RUN dotnet build "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
RUN dotnet publish "./WebApi_data_value.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "./Parking_space_WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "WebApi_data_value.dll"]
|
ENTRYPOINT ["dotnet", "Parking_space_WebAPI.dll"]
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Entities;
|
namespace Parking_space_WebAPI.Entities;
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Helpers;
|
namespace Parking_space_WebAPI.Helpers;
|
||||||
|
|
||||||
public class AppSettings
|
public class AppSettings
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models;
|
namespace Parking_space_WebAPI.Models;
|
||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace WebApi_data_value.Models;
|
namespace Parking_space_WebAPI.Models;
|
||||||
|
|
||||||
using WebApi_data_value.Entities;
|
using Parking_space_WebAPI.Entities;
|
||||||
|
|
||||||
public class AuthenticateResponse
|
public class AuthenticateResponse
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_space_algorithm
|
public class Parking_space_algorithm
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_cam
|
public class Parking_spaces_cam
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_cam_ptz
|
public class Parking_spaces_cam_ptz
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_cam_ptz_car_num_check
|
public class Parking_spaces_cam_ptz_car_num_check
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_cam_ptz_pass
|
public class Parking_spaces_cam_ptz_pass
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_cam_ptz_violation
|
public class Parking_spaces_cam_ptz_violation
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_history
|
public class Parking_spaces_history
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_instant
|
public class Parking_spaces_instant
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_lcd_instand
|
public class Parking_spaces_lcd_instand
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_roi
|
public class Parking_spaces_roi
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_roi_car_num_check
|
public class Parking_spaces_roi_car_num_check
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_roi_pass
|
public class Parking_spaces_roi_pass
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_roi_violation
|
public class Parking_spaces_roi_violation
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_total_table
|
public class Parking_spaces_total_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Parking_spaces_violation_total_table
|
public class Parking_spaces_violation_total_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Violation_car_table
|
public class Violation_car_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Yuntech_cam
|
public class Yuntech_cam
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Yuntech_cam_total_table
|
public class Yuntech_cam_total_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.Models
|
namespace Parking_space_WebAPI.Models
|
||||||
{
|
{
|
||||||
public class Yuntech_in_car_table
|
public class Yuntech_in_car_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,9 +7,9 @@ using Microsoft.OpenApi.Models;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Helpers;
|
using Parking_space_WebAPI.Helpers;
|
||||||
using WebApi_data_value.Services;
|
using Parking_space_WebAPI.Services;
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
//在 ASP.NET Core 中啟用 CORS (跨原始來源要求)
|
//在 ASP.NET Core 中啟用 CORS (跨原始來源要求)
|
||||||
builder.Services.AddCors();
|
builder.Services.AddCors();
|
||||||
|
@ -29,7 +29,8 @@ builder.Services.AddDbContext<SqlContext>(opt =>
|
||||||
string connectionString = builder.Configuration.GetConnectionString("tarefasConnection");
|
string connectionString = builder.Configuration.GetConnectionString("tarefasConnection");
|
||||||
var serverVersion = ServerVersion.AutoDetect(connectionString);
|
var serverVersion = ServerVersion.AutoDetect(connectionString);
|
||||||
opt.UseMySql(connectionString, serverVersion);
|
opt.UseMySql(connectionString, serverVersion);
|
||||||
});*/
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//身分驗證
|
//身分驗證
|
||||||
|
@ -61,7 +62,7 @@ builder.Services.AddDbContext<SqlContext>(opt =>
|
||||||
});
|
});
|
||||||
services.AddSwaggerGen(c =>
|
services.AddSwaggerGen(c =>
|
||||||
{
|
{
|
||||||
c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApi_data_value", Version = "v1" });
|
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Parking_space_WebAPI", Version = "v1" });
|
||||||
|
|
||||||
// Configure Swagger to use JWT authentication
|
// Configure Swagger to use JWT authentication
|
||||||
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
|
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"WebApi_data_value": {
|
"Parking_space_WebAPI": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
|
|
|
@ -4,11 +4,11 @@ using System.Linq;
|
||||||
using Microsoft.Extensions.Configuration.Json;
|
using Microsoft.Extensions.Configuration.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
using WebApi_data_value.Entities;
|
using Parking_space_WebAPI.Entities;
|
||||||
|
|
||||||
|
|
||||||
namespace WebApi_data_value.Services
|
namespace Parking_space_WebAPI.Services
|
||||||
{
|
{
|
||||||
public class SqlContext : DbContext
|
public class SqlContext : DbContext
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
namespace WebApi_data_value.Services;
|
namespace Parking_space_WebAPI.Services;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WebApi_data_value.Authorization;
|
using Parking_space_WebAPI.Authorization;
|
||||||
using WebApi_data_value.Entities;
|
using Parking_space_WebAPI.Entities;
|
||||||
using WebApi_data_value.Models;
|
using Parking_space_WebAPI.Models;
|
||||||
|
|
||||||
public interface IUserService
|
public interface IUserService
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.ViewModel
|
namespace Parking_space_WebAPI.ViewModel
|
||||||
{
|
{
|
||||||
public class Single_Parking_spaces
|
public class Single_Parking_spaces
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.ViewModel
|
namespace Parking_space_WebAPI.ViewModel
|
||||||
{
|
{
|
||||||
public class Single_license_plate_number
|
public class Single_license_plate_number
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace WebApi_data_value.ViewModel
|
namespace Parking_space_WebAPI.ViewModel
|
||||||
{
|
{
|
||||||
public class Single_violation_car_table
|
public class Single_violation_car_table
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@model WebApi_data_value.Models.Parking_space_algorithm
|
@model Parking_space_WebAPI.Models.Parking_space_algorithm
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Create";
|
ViewData["Title"] = "Create";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@model WebApi_data_value.Models.Parking_space_algorithm
|
@model Parking_space_WebAPI.Models.Parking_space_algorithm
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Delete";
|
ViewData["Title"] = "Delete";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@model WebApi_data_value.Models.Parking_space_algorithm
|
@model Parking_space_WebAPI.Models.Parking_space_algorithm
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Details";
|
ViewData["Title"] = "Details";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@model WebApi_data_value.Models.Parking_space_algorithm
|
@model Parking_space_WebAPI.Models.Parking_space_algorithm
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Edit";
|
ViewData["Title"] = "Edit";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@model IEnumerable<WebApi_data_value.Models.Parking_space_algorithm>
|
@model IEnumerable<Parking_space_WebAPI.Models.Parking_space_algorithm>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Index";
|
ViewData["Title"] = "Index";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user