using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Controllers;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Common;
using SPTarkov.Server.Core.Utils;
namespace SPTarkov.Server.Core.Callbacks;
[Injectable]
public class WeatherCallbacks(
HttpResponseUtil httpResponseUtil,
WeatherController weatherController
)
{
///
/// Handle client/weather
///
///
///
/// Session/player id
///
public ValueTask GetWeather(string url, EmptyRequestData _, MongoId sessionID)
{
return new ValueTask(httpResponseUtil.GetBody(weatherController.Generate()));
}
///
/// Handle client/localGame/weather
///
///
///
/// Session/player id
///
public ValueTask GetLocalWeather(string url, EmptyRequestData _, MongoId sessionID)
{
return new ValueTask(
httpResponseUtil.GetBody(weatherController.GenerateLocal(sessionID))
);
}
}