add "+" to numbers if hit limit (>50), fix linting

This commit is contained in:
2024-11-05 09:06:04 -07:00
parent f96c5892e7
commit 0d880d1edc
4 changed files with 50 additions and 30 deletions

View File

@@ -591,6 +591,10 @@ export async function setPlanInCache(
planCache.set(handleId, planSummary);
}
/**
*
* @returns { data: Array<OfferSummaryRecord>, hitLimit: boolean }
*/
export async function getNewOffersToUser(
axios: Axios,
apiServer: string,
@@ -603,10 +607,12 @@ export async function getNewOffersToUser(
}
const headers = await getHeaders(activeDid);
const response = await axios.get(url, { headers });
const offers = response.data.data;
return offers;
return response.data;
}
/**
*
* @returns { data: Array<OfferToPlanSummaryRecord>, hitLimit: boolean }
*/
export async function getNewOffersToUserProjects(
axios: Axios,
apiServer: string,
@@ -619,8 +625,7 @@ export async function getNewOffersToUserProjects(
}
const headers = await getHeaders(activeDid);
const response = await axios.get(url, { headers });
const offers = response.data.data;
return offers;
return response.data;
}
/**