formatting and add Wipe Endpoint to V2
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using SPTarkov.DI.Annotations;
|
||||
using SPTarkov.Server.Core.Controllers;
|
||||
using SPTarkov.Server.Core.Models.Common;
|
||||
using SPTarkov.Server.Core.Models.Eft.Launcher;
|
||||
using SPTarkov.Server.Core.Models.Spt.Launcher;
|
||||
using SPTarkov.Server.Core.Utils;
|
||||
@@ -15,17 +16,26 @@ public class LauncherV2Callbacks(
|
||||
{
|
||||
public ValueTask<string> Ping()
|
||||
{
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2PingResponse { Response = launcherV2Controller.Ping() }));
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2PingResponse
|
||||
{
|
||||
Response = launcherV2Controller.Ping()
|
||||
}));
|
||||
}
|
||||
|
||||
public ValueTask<string> Types()
|
||||
{
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2TypesResponse { Response = launcherV2Controller.Types() }));
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2TypesResponse
|
||||
{
|
||||
Response = launcherV2Controller.Types()
|
||||
}));
|
||||
}
|
||||
|
||||
public ValueTask<string> Login(LoginRequestData info)
|
||||
{
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2LoginResponse { Response = launcherV2Controller.Login(info) }));
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2LoginResponse
|
||||
{
|
||||
Response = launcherV2Controller.Login(info)
|
||||
}));
|
||||
}
|
||||
|
||||
public async ValueTask<string> Register(RegisterData info)
|
||||
@@ -55,26 +65,49 @@ public class LauncherV2Callbacks(
|
||||
public ValueTask<string> CompatibleVersion()
|
||||
{
|
||||
return new ValueTask<string>(
|
||||
httpResponseUtil.NoBody(new LauncherV2VersionResponse { Response = launcherV2Controller.SptVersion() })
|
||||
httpResponseUtil.NoBody(new LauncherV2VersionResponse
|
||||
{
|
||||
Response = launcherV2Controller.SptVersion()
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public ValueTask<string> Mods()
|
||||
{
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2ModsResponse { Response = launcherV2Controller.LoadedMods() }));
|
||||
return new ValueTask<string>(httpResponseUtil.NoBody(new LauncherV2ModsResponse
|
||||
{
|
||||
Response = launcherV2Controller.LoadedMods()
|
||||
}));
|
||||
}
|
||||
|
||||
public ValueTask<string> Profiles()
|
||||
{
|
||||
return new ValueTask<string>(
|
||||
httpResponseUtil.NoBody(new LauncherV2ProfilesResponse { Response = profileController.GetMiniProfiles() })
|
||||
httpResponseUtil.NoBody(new LauncherV2ProfilesResponse
|
||||
{
|
||||
Response = profileController.GetMiniProfiles()
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public ValueTask<string> Profile(LoginRequestData sessionId)
|
||||
public ValueTask<string> Profile(LoginRequestData username)
|
||||
{
|
||||
return new ValueTask<string>(
|
||||
httpResponseUtil.NoBody(new LauncherV2ProfileResponse { Response = launcherV2Controller.GetMiniProfileFromUsername(sessionId) })
|
||||
httpResponseUtil.NoBody(new LauncherV2ProfileResponse
|
||||
{
|
||||
Response = launcherV2Controller.GetMiniProfileFromUsername(username)
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public ValueTask<string> Wipe(RegisterData info)
|
||||
{
|
||||
return new ValueTask<string>(
|
||||
httpResponseUtil.NoBody(new LauncherV2WipeResponse
|
||||
{
|
||||
Response = launcherV2Controller.Wipe(info),
|
||||
Profiles = profileController.GetMiniProfiles(),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user