1
0
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:
2020-03-25 18:44:51 +01:00
parent 4004d5fd77
commit 336923bee7
4 changed files with 34 additions and 2 deletions

View File

@ -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)))
};