chore: format

This commit is contained in:
naskya 2024-05-16 04:22:41 +09:00
parent 0de54e02f8
commit 4b96063c23
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
2 changed files with 6 additions and 7 deletions

View file

@ -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,

View file

@ -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) {