mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 14:28:08 +09:00
[backend] Fix build on Node 22
This commit is contained in:
parent
01555c995e
commit
09afdeb04c
@ -1,12 +1,12 @@
|
|||||||
import type Koa from "koa";
|
import type Koa from "koa";
|
||||||
import { fetchMeta } from "@/misc/fetch-meta.js";
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
import manifest from "./manifest.json" assert { type: "json" };
|
import fs from "fs";
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
const manifest = JSON.parse(fs.readFileSync(path.resolve('./src/server/web/manifest.json'), 'utf-8'));
|
||||||
|
|
||||||
export const manifestHandler = async (ctx: Koa.Context) => {
|
export const manifestHandler = async (ctx: Koa.Context) => {
|
||||||
// TODO
|
const res = manifest;
|
||||||
//const res = structuredClone(manifest);
|
|
||||||
const res = JSON.parse(JSON.stringify(manifest));
|
|
||||||
|
|
||||||
const instance = await fetchMeta(true);
|
const instance = await fetchMeta(true);
|
||||||
|
|
||||||
res.short_name = instance.name || "Iceshrimp";
|
res.short_name = instance.name || "Iceshrimp";
|
||||||
|
Loading…
Reference in New Issue
Block a user