Skip to content

Commit

Permalink
add got pub chat
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Jan 12, 2024
1 parent aedfc71 commit 8c6be35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/handlers/private-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,4 +600,9 @@ export const chatsUpdate = async (req: express.Request, res: express.Response) =
pipe(apiRequest(`chats/${username}/${id}`, "PUT", {}, data), res);
}

export const chatsPub = async (req: express.Request, res: express.Response) => {
const {username} = req.params;
pipe(apiRequest(`chats/pub/${username}`, "GET"), res);
}


2 changes: 2 additions & 0 deletions src/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ server
.get("^/private-api/referrals/:username$", privateApi.referrals)
.get("^/private-api/referrals/:username/stats$", privateApi.referralsStats)
.get("^/private-api/announcements$", privateApi.getAnnouncement)
.get("^/private-api/chats-pub", privateApi.chatsPub)

.post("^/private-api/comment-history$", privateApi.commentHistory)
.post("^/private-api/points$", privateApi.points)
Expand All @@ -62,6 +63,7 @@ server
.post("^/private-api/post-reblog-count$", privateApi.reblogCount)
.post("^/private-api/portfolio$", privateApi.portfolio)


/* Login required private api endpoints */
.post("^/private-api/notifications/unread$", privateApi.unreadNotifications)
.post("^/private-api/notifications/mark$", privateApi.markNotifications)
Expand Down

0 comments on commit 8c6be35

Please sign in to comment.