feat - clea up usage tab

This commit is contained in:
Ishaan Jaff 2024-06-03 15:42:37 -07:00
parent 45cb899687
commit 67312204d7
3 changed files with 57 additions and 37 deletions

View file

@ -979,7 +979,8 @@ export const teamSpendLogsCall = async (accessToken: String) => {
export const tagsSpendLogsCall = async (
accessToken: String,
startTime: String | undefined,
endTime: String | undefined
endTime: String | undefined,
tags: String[] | undefined
) => {
try {
let url = proxyBaseUrl
@ -990,6 +991,11 @@ export const tagsSpendLogsCall = async (
url = `${url}?start_date=${startTime}&end_date=${endTime}`;
}
// if tags, convert the list to a comma separated string
if (tags) {
url += `${url}&tags=${tags.join(",")}`;
}
console.log("in tagsSpendLogsCall:", url);
const response = await fetch(`${url}`, {
method: "GET",