Skip to content

Commit

Permalink
add boost plus account api
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Feb 2, 2024
1 parent 43e17bb commit 0994ec1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/server/handlers/private-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,19 @@ export const promotedPost = async (req: express.Request, res: express.Response)
pipe(apiRequest(`promoted-posts/${author}/${permlink}`, "GET"), res);
}

export const boostPlusPrice = async (req: express.Request, res: express.Response) => {
const username = await validateCode(req, res);
if (!username) res.status(401).send("Unauthorized");
pipe(apiRequest(`boost-plus-price`, "GET"), res);
}

export const boostedPlusAccount = async (req: express.Request, res: express.Response) => {
const username = await validateCode(req, res);
if (!username) res.status(401).send("Unauthorized");
const {account} = req.body;
pipe(apiRequest(`boosted-plus-accounts/${account}`, "GET"), res);
}

export const boostOptions = async (req: express.Request, res: express.Response) => {
const username = await validateCode(req, res);
if (!username) res.status(401).send("Unauthorized");
Expand Down
2 changes: 2 additions & 0 deletions src/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ server
.post("^/private-api/points-calc$", privateApi.pointsCalc)
.post("^/private-api/promote-price$", privateApi.promotePrice)
.post("^/private-api/promoted-post$", privateApi.promotedPost)
.post("^/private-api/boost-plus-price$", privateApi.boostPlusPrice)
.post("^/private-api/boosted-plus-account$", privateApi.boostedPlusAccount)
.post("^/private-api/boost-options$", privateApi.boostOptions)
.post("^/private-api/boosted-post$", privateApi.boostedPost)
.post("^/private-api/usr-activity$", privateApi.activities)
Expand Down

0 comments on commit 0994ec1

Please sign in to comment.