I tried the query post function today, which worked, I then tried the same code I posted previously without changing anything and it weirdly seemed to work, not entirely sure why! Was there an update?
However, I’m having the same issues with getCategory too. Can you spot any issues here, or should I just try it again in a few days and see if it’s magically repaired itself haha
(Continued) Page code:
import { getPostFromFile } from “backend/forumEventsGetPost.jsw”;
import { getCategory } from “backend/forumEvents2.jsw”;
export async function text63_click(event) {
let postId = "65d1dd9381c1180010307d70";
const postIs = await getPostFromFile(postId);
//see result in image
console.log("category is:", postIs.categoryId);
let categoryId = postIs.categoryId;
const categoryIs = await getCategory(categoryId);
console.log("category result is:");
console.log(categoryIs);
}
Backend File:
import { categories } from ‘wix-forum.v2’;
import * as wixAuth from ‘wix-auth’;