forked from phoenix/litellm-mirror
feat - filter tags by startTime and endTime
This commit is contained in:
parent
6ea5a276f8
commit
5845d6f958
1 changed files with 11 additions and 2 deletions
|
@ -655,11 +655,20 @@ export const teamSpendLogsCall = async (accessToken: String) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export const tagsSpendLogsCall = async (accessToken: String) => {
|
export const tagsSpendLogsCall = async (
|
||||||
|
accessToken: String,
|
||||||
|
startTime: String | undefined,
|
||||||
|
endTime: String | undefined
|
||||||
|
) => {
|
||||||
try {
|
try {
|
||||||
const url = proxyBaseUrl
|
let url = proxyBaseUrl
|
||||||
? `${proxyBaseUrl}/global/spend/tags`
|
? `${proxyBaseUrl}/global/spend/tags`
|
||||||
: `/global/spend/tags`;
|
: `/global/spend/tags`;
|
||||||
|
|
||||||
|
if (startTime && endTime) {
|
||||||
|
url = `${url}?start_date=${startTime}&end_date=${endTime}`
|
||||||
|
}
|
||||||
|
|
||||||
console.log("in tagsSpendLogsCall:", url);
|
console.log("in tagsSpendLogsCall:", url);
|
||||||
const response = await fetch(`${url}`, {
|
const response = await fetch(`${url}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue