Skip to content

Commit

Permalink
add public bots
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Feb 4, 2024
1 parent 1448a19 commit 00983c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/server/handlers/private-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ export const channelAdd = async (req: express.Request, res: express.Response) =>
}

export const channelGet = async (req: express.Request, res: express.Response) => {
res.send(bots)
const {username} = req.params;
pipe(apiRequest(`channel/${username}`, "GET"), res);
}

export const channelsGet = async (req: express.Request, res: express.Response) => {
Expand All @@ -641,3 +642,8 @@ export const chatsGet = async (req: express.Request, res: express.Response) => {
const data = {users};
pipe(apiRequest(`chats/pubs`, "POST", {}, data), res);
}

export const botsGet = async (req: express.Request, res: express.Response) => {
res.send(bots)
}

2 changes: 1 addition & 1 deletion src/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ server
.get("^/private-api/engine-account-history", engineApi.engineAccountHistory)

// Private Api
.get("^/private-api/public/bots$", privateApi.channelGet)
.get("^/private-api/public/bots$", privateApi.botsGet)
.get("^/private-api/received-vesting/:username$", privateApi.receivedVesting)
.get("^/private-api/received-rc/:username$", privateApi.receivedRC)
.get("^/private-api/rewarded-communities$", privateApi.rewardedCommunities)
Expand Down

0 comments on commit 00983c5

Please sign in to comment.