use prim ctor and fixed warnings: LocationCallbacks, MatchCallbacks
This commit is contained in:
@@ -1,29 +1,17 @@
|
||||
using Core.Annotations;
|
||||
using Core.Controllers;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.HttpResponse;
|
||||
using Core.Models.Eft.Location;
|
||||
using Core.Utils;
|
||||
|
||||
namespace Core.Callbacks;
|
||||
|
||||
[Injectable]
|
||||
public class LocationCallbacks
|
||||
public class LocationCallbacks(
|
||||
HttpResponseUtil _httpResponseUtil,
|
||||
LocationController _locationController
|
||||
)
|
||||
{
|
||||
protected HttpResponseUtil _httpResponseUtil;
|
||||
protected LocationController _locationController;
|
||||
|
||||
public LocationCallbacks
|
||||
(
|
||||
HttpResponseUtil httpResponseUtil,
|
||||
LocationController locationController
|
||||
)
|
||||
{
|
||||
_httpResponseUtil = httpResponseUtil;
|
||||
_locationController = locationController;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/locations
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Core.Annotations;
|
||||
using Core.Controllers;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.HttpResponse;
|
||||
using Core.Models.Eft.Match;
|
||||
using Core.Services;
|
||||
using Core.Utils;
|
||||
@@ -10,27 +8,12 @@ using Core.Utils;
|
||||
namespace Core.Callbacks;
|
||||
|
||||
[Injectable]
|
||||
public class MatchCallbacks
|
||||
public class MatchCallbacks(
|
||||
HttpResponseUtil _httpResponseUtil,
|
||||
MatchController _matchController,
|
||||
DatabaseService _databaseService
|
||||
)
|
||||
{
|
||||
protected HttpResponseUtil _httpResponseUtil;
|
||||
protected JsonUtil _jsonUtil;
|
||||
protected MatchController _matchController;
|
||||
protected DatabaseService _databaseService;
|
||||
|
||||
public MatchCallbacks
|
||||
(
|
||||
HttpResponseUtil httpResponseUtil,
|
||||
JsonUtil jsonUtil,
|
||||
MatchController matchController,
|
||||
DatabaseService databaseService
|
||||
)
|
||||
{
|
||||
_httpResponseUtil = httpResponseUtil;
|
||||
_jsonUtil = jsonUtil;
|
||||
_matchController = matchController;
|
||||
_databaseService = databaseService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/match/updatePing
|
||||
/// </summary>
|
||||
@@ -76,7 +59,7 @@ public class MatchCallbacks
|
||||
/// <returns></returns>
|
||||
public string GroupCurrent(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
return _httpResponseUtil.GetBody(new MatchGroupCurrentResponse() { Squad = new() });
|
||||
return _httpResponseUtil.GetBody(new MatchGroupCurrentResponse { Squad = [] });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user