fix: bundle assets into executable
This commit is contained in:
+6
-5
@@ -11,10 +11,11 @@ import {
|
||||
import { twj } from "tw-to-css";
|
||||
import type { App } from "@";
|
||||
import { ConstsSvg } from "@/assets/consts";
|
||||
import { mockData } from "@/lib/mock";
|
||||
import shadeSvg from "@/assets/shade.svg" with { type: "file" };
|
||||
import fontFile from "@/assets/shinshin.woff2" with { type: "file" };
|
||||
|
||||
const font = file("src/assets/shinshin.woff2");
|
||||
const shade = file("src/assets/shade.svg");
|
||||
const font = file(fontFile);
|
||||
const shade = file(shadeSvg);
|
||||
|
||||
export function card(app: App) {
|
||||
return app
|
||||
@@ -28,8 +29,8 @@ export function card(app: App) {
|
||||
"/genshin/:uid/:char",
|
||||
async ({ params: { uid, char: charId } }) => {
|
||||
try {
|
||||
// const data = await fetchEnka(uid, false);
|
||||
const data = mockData;
|
||||
// const data = mockData;
|
||||
const data = await fetchEnka(uid, false);
|
||||
if (typeof data.avatarInfoList === "undefined")
|
||||
return status(400, "The showcase for this UID is private");
|
||||
const char = data.avatarInfoList.find(
|
||||
|
||||
Reference in New Issue
Block a user