fix: more consistent logging

This commit is contained in:
2026-03-20 23:07:05 +07:00 Unverified
parent eb77c59412
commit e59054f959
+4 -3
View File
@@ -68,11 +68,12 @@ export function card(app: App) {
.head(
"/genshin/:uid/:char/preload",
async ({ params: { uid }, store: { start } }) => {
console.log(`\nSTART - Preload ${uid}`);
try {
await Promise.all([
deduper.acquire("stores", () =>
getEnkaStores().finally(() =>
console.log(`\n${Date.now() - start}ms - Stores loaded`),
console.log(`${Date.now() - start}ms - Stores loaded`),
),
),
deduper.acquire(`enka-${uid}`, () =>
@@ -107,14 +108,14 @@ export function card(app: App) {
store: { start },
query: { debug, h: height = 1024 },
}) => {
console.log(`START - Rendering ${uid}/${charId}`);
console.log(`\nSTART - Rendering ${uid}/${charId}`);
try {
// #region Data fetching
const [[avatarStore, weaponStore, relicStore, locs], data] =
await Promise.all([
deduper.acquire("stores", () =>
getEnkaStores().finally(() =>
console.log(`\n${Date.now() - start}ms - Stores loaded`),
console.log(`${Date.now() - start}ms - Stores loaded`),
),
),
feature("API") || uid !== "775956514"