finished hooking up promotion history
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { BatchPromotion, BatchPromotionMember } from '@shared/schemas/promotionSchema';
|
||||
import { PagedData } from '@shared/types/pagination';
|
||||
import { PromotionSummary, Rank } from '@shared/types/rank'
|
||||
import { PromotionDetails, PromotionSummary, Rank } from '@shared/types/rank'
|
||||
|
||||
// @ts-ignore
|
||||
const addr = import.meta.env.VITE_APIHOST;
|
||||
@@ -60,8 +60,9 @@ export async function getPromoHistory(page?: number, pageSize?: number): Promise
|
||||
});
|
||||
}
|
||||
|
||||
export async function getPromotionsOnDay(day: Date): Promise<BatchPromotionMember[]> {
|
||||
const res = await fetch(`${addr}/memberRanks/${day}`, {
|
||||
export async function getPromotionsOnDay(day: Date): Promise<PromotionDetails[]> {
|
||||
console.log(day.toISOString());
|
||||
const res = await fetch(`${addr}/memberRanks/${day.toISOString()}`, {
|
||||
credentials: 'include',
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user