Post queue write api (#13473)

* move post queue from socket.io to rest api

* move harmony post-queue to core

add canEdit, allow users to edit their queued posts

* fix: openapi spec

* lint: whitespace
This commit is contained in:
Barış Uşaklı
2025-06-05 07:15:45 -04:00
committed by GitHub
parent 6d40a2118c
commit 4fbcfae8b1
13 changed files with 521 additions and 259 deletions

View File

@@ -307,9 +307,11 @@ module.exports = function (Posts) {
if (data.type === 'topic') {
const result = await createTopic(data.data);
data.pid = result.postData.pid;
data.tid = result.topicData.tid;
} else if (data.type === 'reply') {
const result = await createReply(data.data);
data.pid = result.pid;
data.tid = result.tid;
}
await removeFromQueue(id);
plugins.hooks.fire('action:post-queue:submitFromQueue', { data: data });