Setup route to allow switching of profile icon. (!369)
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/369
This commit is contained in:
parent
291edbb75b
commit
fba0f4703a
@ -167,10 +167,10 @@ export class ProfileCallbacks
|
||||
url: string,
|
||||
info: IGetProfileSettingsRequest,
|
||||
sessionId: string,
|
||||
): IGetBodyResponseData<string>
|
||||
): IGetBodyResponseData<boolean>
|
||||
{
|
||||
this.profileController.setChosenProfileIcon(sessionId, info);
|
||||
return this.httpResponse.emptyResponse();
|
||||
|
||||
return this.httpResponse.getBody(this.profileController.setChosenProfileIcon(sessionId, info));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -489,14 +489,15 @@ export class ProfileController
|
||||
/**
|
||||
* Handle client/profile/settings
|
||||
*/
|
||||
public setChosenProfileIcon(sessionId: string, request: IGetProfileSettingsRequest): void
|
||||
public setChosenProfileIcon(sessionId: string, request: IGetProfileSettingsRequest): boolean
|
||||
{
|
||||
const profileToUpdate = this.profileHelper.getPmcProfile(sessionId);
|
||||
if (!profileToUpdate)
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
profileToUpdate.Info.SelectedMemberCategory = request.memberCategory;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export class ProfileStaticRouter extends StaticRouter
|
||||
info: any,
|
||||
sessionID: string,
|
||||
output: string,
|
||||
): Promise<IGetBodyResponseData<string>> =>
|
||||
): Promise<IGetBodyResponseData<boolean>> =>
|
||||
{
|
||||
return this.profileCallbacks.getProfileSettings(url, info, sessionID);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user