merged equal uid request interfaces into one

This commit is contained in:
TheSparta 2024-05-07 15:09:25 +01:00
parent d8f2153009
commit 65f062a3f9
6 changed files with 11 additions and 14 deletions

View File

@ -3,6 +3,7 @@ import { inject, injectable } from "tsyringe";
import { DialogueController } from "@spt-aki/controllers/DialogueController"; import { DialogueController } from "@spt-aki/controllers/DialogueController";
import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { OnUpdate } from "@spt-aki/di/OnUpdate";
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUidRequestData";
import { import {
IAcceptFriendRequestData, IAcceptFriendRequestData,
ICancelFriendRequestData, ICancelFriendRequestData,
@ -247,14 +248,14 @@ export class DialogueCallbacks implements OnUpdate
/** Handle client/friend/ignore/set */ /** Handle client/friend/ignore/set */
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
public ignoreFriend(url: string, request: { uid: string; }, sessionID: string): INullResponseData public ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData
{ {
return this.httpResponse.nullResponse(); return this.httpResponse.nullResponse();
} }
/** Handle client/friend/ignore/remove */ /** Handle client/friend/ignore/remove */
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
public unIgnoreFriend(url: string, request: { uid: string; }, sessionID: string): INullResponseData public unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData
{ {
return this.httpResponse.nullResponse(); return this.httpResponse.nullResponse();
} }

View File

@ -3,6 +3,7 @@ import { inject, injectable } from "tsyringe";
import { GameController } from "@spt-aki/controllers/GameController"; import { GameController } from "@spt-aki/controllers/GameController";
import { OnLoad } from "@spt-aki/di/OnLoad"; import { OnLoad } from "@spt-aki/di/OnLoad";
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUidRequestData";
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
@ -12,7 +13,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
@ -145,7 +145,7 @@ export class GameCallbacks implements OnLoad
return this.httpResponse.noBody({ Version: this.watermark.getInGameVersionLabel() }); return this.httpResponse.noBody({ Version: this.watermark.getInGameVersionLabel() });
} }
public reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData public reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData
{ {
return this.httpResponse.nullResponse(); return this.httpResponse.nullResponse();
} }

View File

@ -3,9 +3,9 @@ import { inject, injectable } from "tsyringe";
import { NotifierController } from "@spt-aki/controllers/NotifierController"; import { NotifierController } from "@spt-aki/controllers/NotifierController";
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUidRequestData";
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse"; import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil";
@ -68,7 +68,7 @@ export class NotifierCallbacks
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
public selectProfile( public selectProfile(
url: string, url: string,
info: ISelectProfileRequestData, info: IUIDRequestData,
sessionID: string, sessionID: string,
): IGetBodyResponseData<ISelectProfileResponse> ): IGetBodyResponseData<ISelectProfileResponse>
{ {

View File

@ -0,0 +1,4 @@
export interface IUIDRequestData
{
uid: string;
}

View File

@ -1,4 +0,0 @@
export interface IReportNicknameRequestData
{
uid: string;
}

View File

@ -1,4 +0,0 @@
export interface ISelectProfileRequestData
{
uid: string;
}