checkout
This commit is contained in:
@@ -12,6 +12,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
// --- Eigene Namespaces ---
|
||||
using Webshop.Api.SwaggerFilters;
|
||||
using Webshop.Application.DTOs.Email;
|
||||
using Webshop.Application.Services.Admin;
|
||||
using Webshop.Application.Services.Admin.Interfaces;
|
||||
using Webshop.Application.Services.Auth;
|
||||
@@ -111,8 +112,9 @@ builder.Services.Configure<ResendClientOptions>(options =>
|
||||
options.ApiToken = builder.Configuration["Resend:ApiToken"]!;
|
||||
});
|
||||
builder.Services.AddTransient<IResend, ResendClient>();
|
||||
builder.Services.Configure<EmailSettings>(builder.Configuration.GetSection("EmailSettings"));
|
||||
|
||||
// Repositories
|
||||
// --- Repositories ---
|
||||
builder.Services.AddScoped<IProductRepository, ProductRepository>();
|
||||
builder.Services.AddScoped<ISupplierRepository, SupplierRepository>();
|
||||
builder.Services.AddScoped<ICustomerRepository, CustomerRepository>();
|
||||
@@ -121,17 +123,32 @@ builder.Services.AddScoped<ICategorieRepository, CategorieRepository>();
|
||||
builder.Services.AddScoped<IOrderRepository, OrderRepository>();
|
||||
builder.Services.AddScoped<IShippingMethodRepository, ShippingMethodRepository>();
|
||||
builder.Services.AddScoped<IAddressRepository, AddressRepository>();
|
||||
builder.Services.AddScoped<IDiscountRepository, DiscountRepository>();
|
||||
builder.Services.AddScoped<IDiscountRepository, DiscountRepository>(); // War doppelt
|
||||
builder.Services.AddScoped<ISettingRepository, SettingRepository>();
|
||||
builder.Services.AddScoped<IShopInfoRepository, ShopInfoRepository>();
|
||||
builder.Services.AddScoped<IDiscountRepository, DiscountRepository>();
|
||||
builder.Services.AddScoped<IReviewRepository, ReviewRepository>();
|
||||
|
||||
// Services
|
||||
// --- Services ---
|
||||
// Public & Core
|
||||
builder.Services.AddScoped<IAuthService, AuthService>();
|
||||
builder.Services.AddScoped<IProductService, ProductService>();
|
||||
builder.Services.AddScoped<IPaymentMethodService, PaymentMethodService>();
|
||||
builder.Services.AddScoped<ICategorieService, CategorieService>();
|
||||
builder.Services.AddScoped<IPaymentMethodService, PaymentMethodService>();
|
||||
builder.Services.AddScoped<IShopInfoService, ShopInfoService>();
|
||||
builder.Services.AddScoped<ISettingService, SettingService>();
|
||||
builder.Services.AddScoped<IDiscountService, DiscountService>();
|
||||
builder.Services.AddScoped<IReviewService, ReviewService>();
|
||||
builder.Services.AddScoped<IEmailService, EmailService>(); // WICHTIG: F<>r Auth & Checkout
|
||||
|
||||
// Customer Scope
|
||||
builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
builder.Services.AddScoped<IOrderService, OrderService>();
|
||||
builder.Services.AddScoped<IAddressService, AddressService>();
|
||||
builder.Services.AddScoped<ICheckoutService, CheckoutService>(); // War doppelt
|
||||
builder.Services.AddScoped<ICartService, CartService>(); // WICHTIG: F<>r Checkout Cleanup
|
||||
builder.Services.AddScoped<ICustomerReviewService, CustomerReviewService>();
|
||||
|
||||
// Admin Scope
|
||||
builder.Services.AddScoped<IAdminUserService, AdminUserService>();
|
||||
builder.Services.AddScoped<IAdminProductService, AdminProductService>();
|
||||
builder.Services.AddScoped<IAdminSupplierService, AdminSupplierService>();
|
||||
@@ -139,21 +156,9 @@ builder.Services.AddScoped<IAdminPaymentMethodService, AdminPaymentMethodService
|
||||
builder.Services.AddScoped<IAdminCategorieService, AdminCategorieService>();
|
||||
builder.Services.AddScoped<IAdminOrderService, AdminOrderService>();
|
||||
builder.Services.AddScoped<IAdminShippingMethodService, AdminShippingMethodService>();
|
||||
builder.Services.AddScoped<IAdminDiscountService, AdminDiscountService>();
|
||||
builder.Services.AddScoped<IAdminSettingService, AdminSettingService>();
|
||||
builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
builder.Services.AddScoped<IOrderService, OrderService>();
|
||||
builder.Services.AddScoped<IAddressService, AddressService>();
|
||||
builder.Services.AddScoped<ICheckoutService, CheckoutService>();
|
||||
builder.Services.AddScoped<IAdminDiscountService, AdminDiscountService>(); // War doppelt
|
||||
builder.Services.AddScoped<IAdminSettingService, AdminSettingService>(); // War doppelt
|
||||
builder.Services.AddScoped<IAdminShopInfoService, AdminShopInfoService>();
|
||||
builder.Services.AddScoped<IShopInfoService, ShopInfoService>();
|
||||
builder.Services.AddScoped<ISettingService, SettingService>();
|
||||
builder.Services.AddScoped<IAdminSettingService, AdminSettingService>();
|
||||
builder.Services.AddScoped<IAdminDiscountService, AdminDiscountService>();
|
||||
builder.Services.AddScoped<ICheckoutService, CheckoutService>();
|
||||
builder.Services.AddScoped<IDiscountService, DiscountService>();
|
||||
builder.Services.AddScoped<IReviewService, ReviewService>();
|
||||
builder.Services.AddScoped<ICustomerReviewService, CustomerReviewService>();
|
||||
builder.Services.AddScoped<IAdminReviewService, AdminReviewService>();
|
||||
builder.Services.AddScoped<IAdminAnalyticsService, AdminAnalyticsService>();
|
||||
builder.Services.AddScoped<IAdminAddressService, AdminAddressService>();
|
||||
|
||||
Reference in New Issue
Block a user