-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
345 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DATABASE_URL="file:./dev.db" | ||
DEFAULT_IMG_QUALITY=70 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// The API docs page | ||
|
||
import SwaggerUI from "swagger-ui-react"; | ||
import "swagger-ui-react/swagger-ui.css"; | ||
import "./custom.css"; | ||
|
||
export default function ApiDocs() { | ||
return <SwaggerUI url="/open-api/document.yaml" />; | ||
return <SwaggerUI url="/openapi/document.yaml" />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NextResponse } from "next/server"; | ||
import { prisma } from "@/app/lib/config/prisma"; | ||
import { StatusCodes } from "http-status-codes"; | ||
|
||
export async function GET(_request: Request) { | ||
try { | ||
// Get all root tags (with no parent) | ||
const tags = await prisma.tag.findMany({ | ||
where: { parent: null }, | ||
}); | ||
|
||
return NextResponse.json(tags); | ||
} catch (error) { | ||
console.error("Error fetching root tags:", error); | ||
return NextResponse.json( | ||
{ error: "Error fetching root tags" }, | ||
{ status: StatusCodes.INTERNAL_SERVER_ERROR } | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
import { useMediaQuery, useTheme } from "@mui/material"; | ||
import Sidebar from "./sidebar"; | ||
import Topbar from "./topbar"; | ||
|
||
export default function AppLayout() { | ||
const [sidebarOpen, setSidebarOpen] = useState(true); | ||
|
||
const theme = useTheme(); | ||
const isDesktop = useMediaQuery(theme.breakpoints.up("md")); | ||
|
||
return ( | ||
<div> | ||
<Topbar | ||
isDesktop={isDesktop} | ||
onClick={() => setSidebarOpen(!sidebarOpen)} | ||
/> | ||
{(isDesktop || sidebarOpen) && <Sidebar />} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.