Skip to content

Commit

Permalink
Switch boosts to new RPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Oct 9, 2024
1 parent 98a3f07 commit 74c0faf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/routes/boost/post/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ export const POST: RequestHandler = async ({ request }) => {
}

return axios
.patch(
`https://api.btcmap.org/v2/elements/${element}`,
{ tags: { 'boost:expires': `${expires.toISOString()}` } },
{ headers }
)
.post(`https://api.btcmap.org/rpc`, {
jsonrpc: '2.0',
method: 'boostelement',
params: { password: BTCMAP_KEY, id: element, days: time * 30 },
id: 1
})
.then(function (response) {
return response.status;
})
Expand Down

0 comments on commit 74c0faf

Please sign in to comment.