refactor: update Elysia initialization with API prefix and fix API destination in Next.js config

feat: add targetId for Pixiv and Twitter uploads in post routes
style: adjust filter container margin and button styles for improved layout
This commit is contained in:
암냥 2026-04-16 23:36:02 +09:00
commit c6fa45bbc0
No known key found for this signature in database
4 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import openapi from "@elysiajs/openapi";
await mongoose.connect(config.mongodb.uri);
const app = new Elysia()
const app = new Elysia({prefix: "/api"})
.use(openapi())
.get("/", () => "어...")

View file

@ -422,6 +422,7 @@ export default new Elysia({ prefix: "/post" })
role: requester.role,
},
action: "post.upload.pixiv",
targetId: pixivData.illust_id,
targetType: "post",
summary: `${requester.username} uploaded Pixiv media`,
detail: {
@ -537,6 +538,7 @@ export default new Elysia({ prefix: "/post" })
role: requester.role,
},
action: "post.upload.twitter",
targetId: tweetData.tweet.id,
targetType: "post",
summary: `${requester.username} uploaded Twitter media`,
detail: {

View file

@ -7,7 +7,7 @@ const nextConfig: NextConfig = {
return [
{
source: '/api/:path*',
destination: `${process.env.API_BASE_URL}/:path*`,
destination: `${process.env.API_BASE_URL}/api/:path*`,
},
];
},

View file

@ -451,7 +451,7 @@ export default function App() {
<Header />
<div className="border-b border-border bg-background/85 backdrop-blur px-6 py-2">
<div className="flex w-full items-center justify-between overflow-x-auto text-sm text-foreground/70">
<div id="filter" className="flex flex-nowrap items-center gap-2 h-6 overflow-x-auto overflow-y-hidden">
<div id="filter" className="flex flex-nowrap items-center gap-2 h-6 overflow-x-auto overflow-y-hidden mr-4">
<button
type="button"
onClick={() => setSelectedTags([])}
@ -464,7 +464,8 @@ export default function App() {
key={tag._id}
type="button"
onClick={() => toggleTag(tag.name)}
className={selectedTags.includes(tag.name) ? "text-foreground" : "text-foreground/50"}
className={(selectedTags.includes(tag.name) ? "text-foreground" : "text-foreground/50") + " w-fit whitespace-nowrap"}
style={{ writingMode: "horizontal-tb" }}
>
{tag.name}
</button>