techgarage-ir.MTWireGuard/Application/Services/HangfireManager.cs

21 lines
545 B
C#
Raw Normal View History

2023-06-23 17:00:49 +03:30
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));
}
}
}