fix: more consistent logging
This commit is contained in:
+4
-3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user