mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-23 10:58:17 +02:00
21 lines
545 B
C#
21 lines
545 B
C#
|
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));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|