1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-28 14:38:52 +00:00

Return dummy background image & likes count

This commit is contained in:
Pierre HUBERT 2019-12-28 14:06:32 +01:00
parent 8ebe93523e
commit a22f339a17
2 changed files with 20 additions and 1 deletions

View File

@ -2,6 +2,8 @@ import { RequestHandler } from "../entities/RequestHandler";
import { UserHelper } from "../helpers/UserHelper";
import { User, UserPageStatus } from "../entities/User";
import { AccountImage, AccountImageVisibilityLevel } from "../entities/AccountImage";
import { BackgroundImageHelper } from "../helpers/BackgroundImageHelper";
import { LikesHelper, LikesType } from "../helpers/LikesHelper";
/**
* User information controller
@ -83,7 +85,8 @@ export class UserController {
info["noCommentOnHisPage"] = user.blockComments;
info["allowPostFromFriendOnHisPage"] = user.allowPostsFromFriends;
info["account_creation_time"] = user.timeCreate;
info["backgroundImage"] = BackgroundImageHelper.GetURL(user.id);
info["pageLikes"] = await LikesHelper.Count(user.id, LikesType.USER);
}
return info;

View File

@ -0,0 +1,16 @@
import { pathUserData } from "../utils/UserDataUtils";
/**
* Legacy background image helper
*
* @author Pierre HUBERT
*/
export class BackgroundImageHelper {
public static GetURL(userID: number) : string {
// Currently, it is not planned to integrate background image anymore
return pathUserData("imgfond/0.jpg");
}
}