Revert "Add missing admin action files and navigation links"
This reverts commit 41be6835bf.
This commit is contained in:
1 parent
4a1e1115b3
commit
4d515bc400
338 files changed
+5949
-28144
No files matched your search
@@ -58,13 +58,14 @@ export async function GET(req: Request) {
|
||||
try {
|
||||
const sp = new URL(req.url).searchParams;
|
||||
const requested = sp.get("type");
|
||||
const type: LeaderboardType = requested === "diamonds" || requested === "duckets" ? requested : "credits";
|
||||
const type: LeaderboardType =
|
||||
requested === "diamonds" || requested === "duckets" ? requested : "credits";
|
||||
|
||||
const rows =
|
||||
type === "credits"
|
||||
? await loadCreditsRows()
|
||||
: // eslint-disable-next-line security/detect-object-injection -- type validated to "diamonds"|"duckets"
|
||||
await loadCurrencyRows(CURRENCY_TYPE[type]);
|
||||
// eslint-disable-next-line security/detect-object-injection -- type validated to "diamonds"|"duckets"
|
||||
: await loadCurrencyRows(CURRENCY_TYPE[type]);
|
||||
|
||||
return apiJson({ type, data: rows }, { status: 200 });
|
||||
} catch {
|
||||
|
||||
Reference in new issue
Block a user