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:
parent
8ebe93523e
commit
a22f339a17
@ -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;
|
||||
|
16
src/helpers/BackgroundImageHelper.ts
Normal file
16
src/helpers/BackgroundImageHelper.ts
Normal 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");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user