mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
refactor: started work on porting socket methods to write API [breaking]
The following socket calls have been removed: * `posts.getRawPost` * `posts.getPostSummaryByPid` Two new Write API routes have been added: - `GET /api/v3/posts/:pid/raw` - `GET /api/v3/posts/:pid/summary`
This commit is contained in:
@@ -315,7 +315,7 @@ define('forum/topic', [
|
||||
destroyed = false;
|
||||
|
||||
async function renderPost(pid) {
|
||||
const postData = postCache[pid] || await socket.emit('posts.getPostSummaryByPid', { pid: pid });
|
||||
const postData = postCache[pid] || await api.get(`/posts/${pid}/summary`);
|
||||
$('#post-tooltip').remove();
|
||||
if (postData && ajaxify.data.template.topic) {
|
||||
postCache[pid] = postData;
|
||||
|
||||
Reference in New Issue
Block a user