medicalHistory: deletion when patient is deleted
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
|
||||
namespace API.Middlewares;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class ApiKeyMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private const string API_KEY_HEADER_NAME = "ApiKey";
|
||||
private readonly string _apiKey;
|
||||
private readonly RequestDelegate _next;
|
||||
|
||||
public ApiKeyMiddleware(RequestDelegate next, IConfiguration configuration)
|
||||
{
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
using System.Text.Json;
|
||||
using Application.Endpoints;
|
||||
using Application.Services.Jwt;
|
||||
|
||||
namespace API.Middlewares;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Application.Services.Jwt;
|
||||
|
||||
public class JwtMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly IJwtService _jwtService;
|
||||
|
||||
private readonly RequestDelegate _next;
|
||||
|
||||
public JwtMiddleware(RequestDelegate next, IJwtService jwtService)
|
||||
{
|
||||
_next = next;
|
||||
@@ -24,7 +20,7 @@ public class JwtMiddleware
|
||||
var path = context.Request.Path.ToString().ToLower();
|
||||
|
||||
// Define the paths that should bypass JWT validation
|
||||
var bypassPaths = new string[]
|
||||
var bypassPaths = new[]
|
||||
{
|
||||
"/api/doctors/login",
|
||||
"/api/doctors/register",
|
||||
|
||||
Reference in New Issue
Block a user