Add peer expiration

This commit is contained in:
Tech Garage 2023-06-23 17:00:49 +03:30
parent 2d67540e13
commit 2ecb92eef6
94 changed files with 43258 additions and 49 deletions

View file

@ -0,0 +1,20 @@
using Hangfire;
using Hangfire.Storage;
using MTWireGuard.Application.Repositories;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MTWireGuard.Application.Services
{
public class HangfireManager
{
public static int SetUserExpiration(int userID, DateTime expireDate)
{
return int.Parse(BackgroundJob.Schedule<IMikrotikRepository>(mikrotik => mikrotik.DisableUser(userID), expireDate));
}
}
}