1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 00:25:17 +00:00

Export all user comments

This commit is contained in:
2020-03-25 18:55:25 +01:00
parent 336923bee7
commit 09b2eed63d
4 changed files with 28 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import { limit_query } from "./APILimitsController";
import { Action } from "../helpers/APILimitsHelper";
import { UserController } from "./UserController";
import { PostsController } from "./PostsController";
import { CommentsController } from "./CommentsController";
/**
* Account controller
@ -232,12 +233,15 @@ export class AccountController {
advanced_info: await UserController.UserToAPI(data.userInfo, h, true),
// User posts
posts: await Promise.all(data.postsList.map((p) => PostsController.PostToAPI(h, p)))
posts: await Promise.all(data.postsList.map((p) => PostsController.PostToAPI(h, p))),
// User comments
comments: await CommentsController.CommentsToAPI(h, data.comments),
};
// TODO : continue
// TODO : continue (additional user info)
h.send(out);