fix: uncomment metadata image storing code
I COMMENTED IT OUT IN 6d9dcde FOR SOME REASON AND FORGOT TO UNCOMMENT
IT!!!!!!
This commit is contained in:
parent
4f4ca540f4
commit
813f3388df
2 changed files with 2 additions and 3 deletions
|
|
@ -64,7 +64,6 @@ export default function Punishments() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
// todo: delete punishments
|
|
||||||
const response = await fetch(`/api/admin/punish?id=${userId}`, {
|
const response = await fetch(`/api/admin/punish?id=${userId}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
|
|
||||||
|
|
@ -200,8 +200,8 @@ export async function generateMetadataImage(mii: Mii, author: string): Promise<{
|
||||||
try {
|
try {
|
||||||
// I tried using .webp here but the quality looked awful
|
// I tried using .webp here but the quality looked awful
|
||||||
// but it actually might be well-liked due to the hatred of .webp
|
// but it actually might be well-liked due to the hatred of .webp
|
||||||
// const fileLocation = path.join(miiUploadsDirectory, "metadata.png");
|
const fileLocation = path.join(miiUploadsDirectory, "metadata.png");
|
||||||
// await fs.writeFile(fileLocation, buffer);
|
await fs.writeFile(fileLocation, buffer);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error storing 'metadata' image type", error);
|
console.error("Error storing 'metadata' image type", error);
|
||||||
return { error: `Failed to store metadata image for ${mii.id}`, status: 500 };
|
return { error: `Failed to store metadata image for ${mii.id}`, status: 500 };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue