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:
@ -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);
|
||||
|
Reference in New Issue
Block a user