mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 08:35:17 +00:00
Export the list of posts of the user
This commit is contained in:
@ -6,6 +6,7 @@ import { removeHTMLNodes } from "../utils/StringUtils";
|
||||
import { limit_query } from "./APILimitsController";
|
||||
import { Action } from "../helpers/APILimitsHelper";
|
||||
import { UserController } from "./UserController";
|
||||
import { PostsController } from "./PostsController";
|
||||
|
||||
/**
|
||||
* Account controller
|
||||
@ -228,7 +229,10 @@ export class AccountController {
|
||||
userID: data.userID,
|
||||
|
||||
// General account information
|
||||
advanced_info: await UserController.UserToAPI(data.userInfo, h, true)
|
||||
advanced_info: await UserController.UserToAPI(data.userInfo, h, true),
|
||||
|
||||
// User posts
|
||||
posts: await Promise.all(data.postsList.map((p) => PostsController.PostToAPI(h, p)))
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user