first pass of promotions list view
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BatchPromotion } from '@shared/schemas/promotionSchema';
|
||||
import { BatchPromotion, BatchPromotionMember } from '@shared/schemas/promotionSchema';
|
||||
import { PagedData } from '@shared/types/pagination';
|
||||
import { PromotionSummary, Rank } from '@shared/types/rank'
|
||||
|
||||
@@ -58,4 +58,16 @@ export async function getPromoHistory(page?: number, pageSize?: number): Promise
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export async function getPromotionsOnDay(day: Date): Promise<BatchPromotionMember[]> {
|
||||
const res = await fetch(`${addr}/memberRanks/${day}`, {
|
||||
credentials: 'include',
|
||||
})
|
||||
|
||||
if (res.ok) {
|
||||
return await res.json();
|
||||
} else {
|
||||
throw new Error("Failed to submit rank change: Server error");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user