Fix Wren API endpoint URL
All checks were successful
Build and Push Docker Images / docker (push) Successful in 47s
All checks were successful
Build and Push Docker Images / docker (push) Successful in 47s
Changed from non-existent api.wren.co to correct www.wren.co Changed endpoint path from offset_orders to offset-orders (hyphen not underscore) Correct endpoints: - POST https://www.wren.co/api/offset-orders - GET https://www.wren.co/api/offset-orders/:id
This commit is contained in:
parent
9fcc458760
commit
a6e655c4a9
@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const WREN_API_BASE_URL = 'https://api.wren.co/v1';
|
||||
const WREN_API_BASE_URL = 'https://www.wren.co/api';
|
||||
|
||||
/**
|
||||
* Create a carbon offset order via Wren Climate API
|
||||
@ -45,7 +45,7 @@ export async function createWrenOffsetOrder({
|
||||
|
||||
try {
|
||||
const response = await axios.post(
|
||||
`${WREN_API_BASE_URL}/offset_orders`,
|
||||
`${WREN_API_BASE_URL}/offset-orders`,
|
||||
{
|
||||
tons: parseFloat(tons),
|
||||
portfolio: portfolioId,
|
||||
@ -111,7 +111,7 @@ export async function getWrenOffsetOrder(orderId) {
|
||||
|
||||
try {
|
||||
const response = await axios.get(
|
||||
`${WREN_API_BASE_URL}/offset_orders/${orderId}`,
|
||||
`${WREN_API_BASE_URL}/offset-orders/${orderId}`,
|
||||
{
|
||||
headers: {
|
||||
'Authorization': `Bearer ${apiToken}`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user