diff --git a/Core/Callbacks/ProfileCallbacks.cs b/Core/Callbacks/ProfileCallbacks.cs
index 8b6736eb..4bc861b6 100644
--- a/Core/Callbacks/ProfileCallbacks.cs
+++ b/Core/Callbacks/ProfileCallbacks.cs
@@ -1,175 +1,166 @@
-using Core.Models.Eft.Common;
-using Core.Models.Eft.HttpResponse;
+using Core.Annotations;
+using Core.Controllers;
+using Core.Helpers;
+using Core.Models.Eft.Common;
using Core.Models.Eft.Launcher;
using Core.Models.Eft.Profile;
+using Core.Utils;
namespace Core.Callbacks;
+[Injectable]
public class ProfileCallbacks
{
- public ProfileCallbacks()
+ protected HttpResponseUtil _httpResponse;
+ protected TimeUtil _timeUtil;
+ protected ProfileController _profileController;
+ protected ProfileHelper _profileHelper;
+
+ public ProfileCallbacks(
+ HttpResponseUtil httpResponse,
+ TimeUtil timeUtil,
+ ProfileController profileController,
+ ProfileHelper profileHelper
+ )
+ {
+ _httpResponse = httpResponse;
+ _timeUtil = timeUtil;
+ _profileController = profileController;
+ _profileHelper = profileHelper;
+ }
+
+ /**
+ * Handle client/game/profile/create
+ */
+ public string CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
{
+ var id = _profileController.CreateProfile(info, sessionID);
+ return _httpResponse.GetBody(new CreateProfileResponse(){ UserId = id });
}
- ///
- /// Handle client/game/profile/create
- ///
- ///
- ///
- ///
- ///
- public GetBodyResponseData CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
+ /**
+ * Handle client/game/profile/list
+ * Get the complete player profile (scav + pmc character)
+ */
+ public string GetProfileData(string url, EmptyRequestData info, string sessionID)
{
- throw new NotImplementedException();
+ return _httpResponse.GetBody(_profileController.GetCompleteProfile(sessionID));
}
- ///
- /// Handle client/game/profile/list
- /// Get the complete player profile (scav + pmc character)
- ///
- ///
- ///
- ///
- ///
- public GetBodyResponseData