Backend-scheudler for telegram notifications by new contact requests
This commit is contained in:
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using RazorPagesMovie.Data;
|
||||
using RazorPagesMovie.Models;
|
||||
using RazorPagesMovie.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddJsonFile("appsettings.Local.json", optional: true, reloadOnChange: true);
|
||||
@@ -21,6 +22,9 @@ builder.Services.AddRazorPages(options =>
|
||||
options.Conventions.AuthorizeFolder("/Admin");
|
||||
});
|
||||
|
||||
builder.Services.AddHttpClient();
|
||||
builder.Services.AddHostedService<ContactMessageNotificationService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
using (var scope = app.Services.CreateScope())
|
||||
|
||||
Reference in New Issue
Block a user