unfinished image API

This commit is contained in:
Tzvetan Trave
2025-10-17 20:06:54 +02:00
parent a265583d4d
commit 0fdbc96dc4
15 changed files with 518 additions and 31 deletions

13
src/api/user/pAvatar.js Normal file
View File

@ -0,0 +1,13 @@
export async function pAvatar(request, reply, fastify, setAvatarId) {
try {
/* const res = await fetch('http://localhost:3004/images', { method: "POST", headers: { } });
if (!res.ok) {
return reply.code(500).send({ error: "Internal server error" });
}
const data = await res.json();*/
return reply.code(200).send({ msg: "Avatar uploaded successfully" });
} catch (err) {
fastify.log.error(err);
return reply.code(500).send({ error: "Internal server error" });
}
}