chore: format
This commit is contained in:
parent
0de54e02f8
commit
4b96063c23
2 changed files with 6 additions and 7 deletions
|
@ -2,11 +2,7 @@ import * as os from "node:os";
|
|||
import define from "@/server/api/define.js";
|
||||
import { redisClient } from "@/db/redis.js";
|
||||
import { db } from "@/db/postgre.js";
|
||||
import {
|
||||
cpuInfo,
|
||||
memoryUsage,
|
||||
storageUsage,
|
||||
} from "backend-rs";
|
||||
import { cpuInfo, memoryUsage, storageUsage } from "backend-rs";
|
||||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
|
|
@ -149,7 +149,9 @@ router.get<{ Params: { path: string } }>("/emoji/:path(.*)", async (ctx) => {
|
|||
return;
|
||||
}
|
||||
|
||||
const url = new URL(`${config.mediaProxy || `${config.url}/proxy`}/emoji.webp`);
|
||||
const url = new URL(
|
||||
`${config.mediaProxy || `${config.url}/proxy`}/emoji.webp`,
|
||||
);
|
||||
// || emoji.originalUrl してるのは後方互換性のため
|
||||
url.searchParams.append("url", emoji.publicUrl || emoji.originalUrl);
|
||||
url.searchParams.append("emoji", "1");
|
||||
|
@ -370,7 +372,8 @@ const getFeed = async (
|
|||
};
|
||||
|
||||
// As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them.
|
||||
const reUser = /^\/@(?<user>[^\/]+?)(?:.(?<feed>json|rss|atom)(?:\?[^\/]*)?)?(?:\/(?<sub>[^\/]+))?$/;
|
||||
const reUser =
|
||||
/^\/@(?<user>[^\/]+?)(?:.(?<feed>json|rss|atom)(?:\?[^\/]*)?)?(?:\/(?<sub>[^\/]+))?$/;
|
||||
router.get(reUser, async (ctx, next) => {
|
||||
const groups = reUser.exec(ctx.originalUrl)?.groups;
|
||||
if (!groups) {
|
||||
|
|
Loading…
Reference in a new issue