mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: logo broken in metadata images, rename methods
This commit is contained in:
parent
59d2b0b2c1
commit
94eef81b93
8 changed files with 32 additions and 32 deletions
|
|
@ -4,7 +4,7 @@ import { auth } from "@/lib/auth";
|
|||
import { prisma } from "@/lib/prisma";
|
||||
import { RateLimit } from "@/lib/rate-limit";
|
||||
|
||||
export async function DELETE(request: NextRequest) {
|
||||
export async function POST(request: NextRequest) {
|
||||
const session = await auth();
|
||||
if (!session || !session.user) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { RateLimit } from "@/lib/rate-limit";
|
|||
|
||||
const uploadsDirectory = path.join(process.cwd(), "uploads", "mii");
|
||||
|
||||
export async function DELETE(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
||||
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
|
||||
const session = await auth();
|
||||
if (!session) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { auth } from "@/lib/auth";
|
|||
import { RateLimit } from "@/lib/rate-limit";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
|
||||
export async function DELETE(request: NextRequest) {
|
||||
export async function POST(request: NextRequest) {
|
||||
const session = await auth();
|
||||
if (!session) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ export async function generateMetadataImage(mii: Mii, author: string): Promise<{
|
|||
|
||||
{/* Watermark */}
|
||||
<div tw="absolute bottom-0 right-0 flex items-center">
|
||||
<img src={`${process.env.NEXT_PUBLIC_BASE_URL}/logo.svg`} height={32} />
|
||||
<img src={`${process.env.NEXT_PUBLIC_FRONTEND_URL}/logo.svg`} height={32} />
|
||||
{/* I tried using text-orange-400 but it wasn't correct..? */}
|
||||
<span tw="ml-2 font-black text-xl" style={{ color: "#FF8904" }}>
|
||||
TomodachiShare
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
// const [error, setError] = useState<string | undefined>(undefined);
|
||||
|
||||
// const handleClick = async () => {
|
||||
// const response = await fetch("/api/return", { method: "DELETE" });
|
||||
// const response = await fetch("/api/return", { method: "POST" });
|
||||
|
||||
// if (!response.ok) {
|
||||
// const data = await response.json();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function DeleteMiiButton({ miiId, miiName, likes, inMiiPage }: Pr
|
|||
const [inputMiiName, setInputMiiName] = useState("");
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const response = await fetch(`${import.meta.env.VITE_API_URL}/api/mii/${miiId}/delete`, { method: "DELETE", credentials: "include" });
|
||||
const response = await fetch(`${import.meta.env.VITE_API_URL}/api/mii/${miiId}/delete`, { method: "POST", credentials: "include" });
|
||||
if (!response.ok) {
|
||||
const { error } = await response.json();
|
||||
setError(error);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default function DeleteAccount() {
|
|||
const [error, setError] = useState<string | undefined>(undefined);
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const response = await fetch(`${import.meta.env.VITE_API_URL}/api/auth/delete`, { method: "DELETE", credentials: "include" });
|
||||
const response = await fetch(`${import.meta.env.VITE_API_URL}/api/auth/delete`, { method: "POST", credentials: "include" });
|
||||
if (!response.ok) {
|
||||
const { error } = await response.json();
|
||||
setError(error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue