I've changed the code, now it isn't constantly loggin. But I still have the same problem, the paint wear shows up on the console, but I can't get the response on the server.
import { csgo } from "@/server";
import { FastifyRequest, FastifyReply } from "fastify";
export async function getFloatSkinController(
req: FastifyRequest,
reply: FastifyReply
) {
const { id } = req.params as { id: string };
const { assetid, inspectLinks } = req.body as {
inspectLinks: string;
assetid: string;
};
if (csgo.haveGCSession) {
console.log("Float");
const filteredID = inspectLinks.split("%D")[1];
return csgo.inspectItem(id, assetid, filteredID, ({ paintwear }) => {
console.log(paintwear);
return reply.send(paintwear);
});
}
}